ruby on rails - Email Field returns blank string -


i using devise in rails3 application.the problem facing email field being returned blank string after save.

    resource.save     rails.logger.info p resource 

this returns me

#<user id: 1850, email: "", encrypted_password: "$2a$10$eznvztkpgyyn2k8i20vxbuk6oz.xq6gfocbouyfkdkx/...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "6e6c41315002a24cf63e4512ab94f693ef9d419218e1cbb9a2d...", confirmed_at: nil, confirmation_sent_at: "2015-07-02 04:49:23", unconfirmed_email: "anildiasdavis@gmail.com", company_code: "wnzqifhn", partner_id: nil, partner_type: nil, super_admin_id: nil, super_admin_type: nil, device_token: nil, is_active: nil, is_disabled: false, total_session_time: "0:0:0", status: "pending", created_at: "2015-07-02 04:49:20", updated_at: "2015-07-02 04:49:20", doctor_id: nil, last_notified_offer_id: nil, is_deleted: false, remove_reason: nil, active_at: nil, deactivated_at: nil, was_disabled: false, is_first_menu_selection: true, is_default_filter: true> 

but when query console gives me correct response.

#<user id: 1850, email: "anildiasdavis@gmail.com", encrypted_password: "$2a$10$eznvztkpgyyn2k8i20vxbuk6oz.xq6gfocbouyfkdkx/...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "6e6c41315002a24cf63e4512ab94f693ef9d419218e1cbb9a2d...", confirmed_at: nil, confirmation_sent_at: "2015-07-02 04:49:23", unconfirmed_email: "anildiasdavis@gmail.com", company_code: "wnzqifhn", partner_id: nil, partner_type: nil, super_admin_id: nil, super_admin_type: nil, device_token: nil, is_active: nil, is_disabled: false, total_session_time: "0:0:0", status: "pending", created_at: "2015-07-02 04:49:20", updated_at: "2015-07-02 04:49:20", doctor_id: nil, last_notified_offer_id: nil, is_deleted: false, remove_reason: nil, active_at: nil, deactivated_at: nil, was_disabled: false, is_first_menu_selection: true, is_default_filter: true> 

why happen?am doing wrong here?


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -