Reputation:
How to do user session time out in rails 4
. I didn't use any gem for authentication. I do my authentication manually. Any Idea please. I have already tried following and it is not working.
in my session_store.r
b file, i added.
key: '_Matchimi_session'
,
expire_after: 1.minutes
Upvotes: 4
Views: 11945
Reputation: 1
I have this in my session_store.rb (as the only line):
Rails.application.config.session_store :cookie_store, key: '_my_session', :expire_after => 1.minutes
I have tested it, it works.
(I presume this is configured not for a specific app, but for all)
I have rails 4.2.3.
Upvotes: 0
Reputation: 112
You can configure the application's session information in the initializer file config/initializers/session_store.rb
YourApp::Application.config.session_store :cookie_store,
:key => '_my_session',
:expire_after => 30.minutes
Upvotes: 8