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] = ''

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

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

ActionController::Base.session_options[:session_domain] = ''

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