On 26 May 2011, at 15:38, Emeka wrote:
I would like to have my session be the database stored instead of
browser. Please, could someone explain to me how to do this?
http://guides.rubyonrails.org/action_controller_overview.html#session
However, there's very little to no reason why you would change to the
ActiveRecordStore. The session should not even contain sensitive data
to start off with, that's not what it's made for. It's also not meant
to be used as a garbage can for heaps of data. If that's the reason
why you want to switch to the ActiveRecordStore, then you should stop
for a second and rethink what you are putting in the session and put
it somewhere else.
Also, keep in mind that when you switch to the ActiveRecordStore:
- You will need to clean the expired sessions on regular intervals
yourself
- You will be hitting the database a lot more often on every request,
a waste of server resources in my opinion
Best regards
Peter De Berdt
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.