This seems simple: I am trying to get my rails Active Record session to timeout after 2 minutes. So after two minutes I want my users to have to re-login.
I'm just running rails server
(i.e. WebBrick) on my local dev machine.
I know this is something to do with the following code in config/initalizers/session_store.rb
, but I don't think I have quite nailed it:
CodedOn::Application.config.session_store :active_record_store
CodedOn::Application.configure do
config.action_controller.session = {:expire_after => 2.minutes}
end
This doesn't seem to work, or at least my session doesn't appear to timeout. I can't find much about the Rails 3 way to do this as I know things have changed from Rails 2.x.
Can some one help me out?