Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails: get session timeout

I can't figure out how to get the session timeout in Rails (either default or configured); here it is written how to set it, but how to get it doesn't.

I tried:

  • Some::Application.config.session_store: returns a class
  • app.controller.session.timeout, ...expires_at: doesn't work
  • docs: no clues
like image 637
mdesantis Avatar asked Aug 19 '26 09:08

mdesantis


1 Answers

I know this question is old, but I'll leave this here for future weary travelers:

To get options defined from

Rails.application.config.session_store ....

You can do

Rails.application.config.session_options
like image 119
mttdffy Avatar answered Aug 22 '26 07:08

mttdffy