# Remember me functionality

**URL:** <https://www.ruby-forum.com/t/remember-me-functionality/196493>\
**Category:** Rails\
**Created:** [October 18, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/remember-me-functionality/196493 "2007-10-18T13:33:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruchita](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Post date:** [October 18, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/remember-me-functionality/196493/1 "2007-10-18T13:33:36Z")

</div>

Hi all,

I am trying to implement the functionality of Remember Me. The  
requirement is that once the user closes the browser after checking the  
remember me check box, it should return to the login page with username  
and password fields to be filled into the text boxes and the checkbox  
button checked, so that there is no need to fill all the fields. I am  
not able to fill the text boxes with user name and password fields.

Any help would be greatly appreciated.

Thanks,  
Ruchita.

---

<div class="post-metadata">

**Author:** ![ruchita](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Post date:** [October 18, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/remember-me-functionality/196493/2 "2007-10-18T18:06:32Z")

</div>

in order for the boxes / fields to be filled automatically you’ll need  
to have something like

====rhtml====

\<%= text\_field ‘obj’, ‘attribute1’ %\>  
\<%= check\_box ‘obj’, ‘attribute2’ %\>  
\<%= etc\_field ‘obj’, ‘attribute3’ %\>

====controller====

def rhtml  
@obj = Model.find(obj\_id)  
end

and the fields should be filled automatically.  
hope this helps 🙂

shai

---

<div class="post-metadata">

**Author:** ![ruchita](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Post date:** [October 18, 2007, 6:07pm UTC](https://www.ruby-forum.com/t/remember-me-functionality/196493/3 "2007-10-18T18:07:14Z")

</div>

\<%= text\_field ‘obj’, ‘attribute1’, :value =\> @obj.attribute1 %\>  
\<%= check\_box ‘obj’, ‘attribute2’, :value =\> @obj.attribute2 %\>  
\<%= etc\_field ‘obj’, ‘attribute3’, :value =\> @obj.attribute3 %\>

…
