When a user logs into my site at example.com
, I want him to be logged in when he visits something.example.com
. How can I accomplish this? (I'm using subdomain-fu if relevant)
views:
24answers:
1
A:
The fix is to add this to production.rb
:
if config.action_controller.session
config.action_controller.session[:domain] = '.your-site.com'
else
config.action_controller.session = { :domain => '.your-site.com' }
end
I still can't get it to work in development with localhost:3000
, but whatever
Horace Loeb
2010-07-01 17:20:56