How to check the config.action_controller.session options?

when setting it in my environment.rb
config.action_controller.session = {
:session_key => ‘_myapp_session’,
:secret => ‘3a64394bb895f1f05e0c07f71127d93d’
}

I cannot get it back in the script/console …
:session_key=>"_session_id" !!!
why ?

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
=> {:session_key=>"_session_id", :cookie_only=>true, :session_path=>"/",
:prefix=>“ruby_sess.”, :database_manager=>CGI::Session::CookieStore,
:tmpdir=>"/Users/myself/tmp/sessions/"}

how can get back the :session_key and :secret in my controllers ?

Kad K. wrote:

when setting it in my environment.rb
config.action_controller.session = {
:session_key => ‘_myapp_session’,
:secret => ‘3a64394bb895f1f05e0c07f71127d93d’
}

I cannot get it back in the script/console …
:session_key=>"_session_id" !!!
why ?

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
=> {:session_key=>"_session_id", :cookie_only=>true, :session_path=>"/",
:prefix=>“ruby_sess.”, :database_manager=>CGI::Session::CookieStore,
:tmpdir=>"/Users/myself/tmp/sessions/"}

how can get back the :session_key and :secret in my controllers ?

I wondered how to see these (non default) configuration values myself. I
discovered that in the console these values can be seen with

Rails.configuration.action_controller.session

Jarl

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs