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

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:

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.