Teaching Ruby to Children

- - posted in ruby | Comments

The configuration for setting the session domain between different Rails 2 versions has changed many times, below are some examples from Google:

1
2
3
ActionController::Base.session_options[:domain] = '.domain.com'

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update( :session_domain => '.domain.com')

After a bit of guess work the correct format for Rails 2.2.2 is:

1
ActionController::Base.session_options[:session_domain] = '.domain.com'

Hope this helps anyone having to add sub-domain’s to a Rails 2.2.2 app.

Comments