devise remember_me value
I am using devise in my application. When a user goes to my website, if i know that the user had previously visited my website and checked 'Remember Me' while logging in, I want to show ihm a special message. How I do ge开发者_运维知识库t this remember me value from devise in my view? Thanks.
If you have a saved user and wants to know whereas he clicked on the remember_me use the field:
@user.remember_created_at
If you have a instantiated user in your controller after the form submission, you can access the value using:
@user.remember_me
remember_me
is a attr_accessor
in Devise gem, see here. Which means it will not be persisted when saving you user's instance.
精彩评论