HighDots Forums  

Modifying the session :key

Ruby On Rails Talk Ruby On Rails programming language mailing list


Discuss Modifying the session :key in the Ruby On Rails Talk forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Kaspick
 
Posts: n/a

Default Modifying the session :key - 11-05-2009 , 12:02 AM






Hello,

I have my base session settings in config/initializers/session_store.rb

I want to override the :key option in one of my environment files. I'm
attempting to do so like this...

config.action_controller.session[:key] = '_new_sesssion_key'

But when I examine the cookies for the site, it's using the :key set in
the config/initializers/session_store.rb still.

Any idea how I go about overriding the :key in my environment files?

Thanks,
Andrew
--
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 (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #2  
Old   
Andrew Kaspick
 
Posts: n/a

Default Re: Modifying the session :key - 11-05-2009 , 01:01 AM






Andrew Kaspick wrote:
Quote:
Hello,

I have my base session settings in config/initializers/session_store.rb

I want to override the :key option in one of my environment files. I'm
attempting to do so like this...

config.action_controller.session[:key] = '_new_sesssion_key'

But when I examine the cookies for the site, it's using the :key set in
the config/initializers/session_store.rb still.

Any idea how I go about overriding the :key in my environment files?

Thanks,
Andrew
I'm just moving the settings in config/initializers/session_store.rb to
environment.rb and overriding in my other environment file for the time
being which seems to work.
--
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 (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.