Categories
Rails

Ruby on Rails: sessions

Browser sessions are handled the following way:

session[:remember_token] = user.id

And then, on each page view, you can do a check for them as follows:

User.find(session[:remember_token])

To reset a session in rails, use: reset_session

Leave a Reply

Your email address will not be published. Required fields are marked *