views:

24

answers:

1

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)

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