Setting the domain of the session cookie in rails
If you have multiple vhosts like app1.example.com – app2.example.com, but you don’t want your users to log in for every vhost, you can set the session cookie of the rails application for the domain .example.com, so it will be valid for all subdomains of example.com. You can set the ‘session_domain’ option of the ActionController in environment.rb like this:
config.action_controller.session = {
:session_domain => 'example.com',
:session_key => '_myapp',
:secret => 'longstringthatyoubetterkeepsecret'
}
Thanks a lot !!
(BTW, cool js effect to deploy the comment form heheh )