Kad Kerforn
2008-Feb-09 08:59 UTC
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 ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jarl Friis
2009-Apr-06 07:20 UTC
Re: how to check the config.action_controller.session options ?
Kad Kerforn 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Possibly Parallel Threads
- CookieStore and Session data via POST vars (no cookies)
- config.action_controller.session_options[:cookie_only] = true
- number_to_currency() helper == non DRY == could be improved
- config.action_controller.session[:secret] vs protect_from_forgery :secret
- Session in ActiveRecordStore