Click here to check if anything new just came in.
August 05 2010
July 31 2010
July 11 2010
July 07 2010
June 20 2010
June 18 2010
June 17 2010
June 16 2010
June 13 2010
June 07 2010
May 29 2010
May 28 2010
HowTo: Share a session with mutliple subdomains in Rails
Sharing a Session between multiple subdomains/rails-apps is quite easy.
Make shure you're using the ActiveRecord (db-based) session store and all instances share the same secret (- obviously the same db, too). In config/environment.rb (config-block):
config.action_controller.session_store = :active_record_store #store session in db
config.action_controller.session = {
:session_key => '_MYWEBAPP', #has to mach over all instances
:secret => 'mysecretmysecretmysecret' #has to mach over all instances
}
Tell rails to set the session-cookie on "all subdomains" by adding this line to config/environments/myenvironment.rb. Note the leading dot in ".mydomain.com".
ActionController::Base.session = { :domain => '.mydomain.com' }
(Apprently this works only for rails >= 2.3)
HowTo: Share a session with mutliple subdomains in Rails
Sharing a Session between multiple subdomains/rails-apps is quite easy.
Make shure you're using the ActiveRecord (db-based) session store and all instances share the same secret (- obviously the same db, too). In config/environment.rb (config-block):
config.action_controller.session_store = :active_record_store #store session in db
config.action_controller.session = {
:session_key => '_MYWEBAPP', #has to mach over all instances
:secret => 'mysecretmysecretmysecret' #has to mach over all instances
}
Tell rails to set the session-cookie on "all subdomains" by adding this line to config/environments/myenvironment.rb. Note the leading dot in ".mydomain.com".
ActionController::Base.session = { :domain => '.mydomain.com' }
(Apprently this works only for rails >= 2.3)
May 25 2010
May 16 2010
May 15 2010
May 13 2010
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...

