Forum: Ruby on Rails Multiple top level domains and one session

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
T. B. (Guest)
on 2008-12-18 08:47
Hello all,

I've been struggling with this for quite awhile and haven't been able to
find a solution. I need a user to be able to view multiple top level
domains with a single login.

My understanding is that this needs to be set in environment.rb and
called with before_dispatch. This is what I've come up with:

 require 'activesupport'
  require 'dispatcher'
  module ActionController
    class Dispatcher

      def set_session_domain
        ActionController::Base.session_options.update :session_domain =>
"#{@request.host}"
      end

      before_dispatch :set_session_domain
    end
  end

- - - -

However, this does not seem to be working when I try and pull the values
from session[:session_domain].

Any help is greatly appreciated.
This topic is locked and can not be replied to.