Sha256: 9e802fc41eaf0e9f9ad06ff786c1f9adeafddf1b34321ec9b1da33e307aa107b

Contents?: true

Size: 529 Bytes

Versions: 126

Compression:

Stored size: 529 Bytes

Contents

module MultiSite
  module RouteSetExtensions

    def self.included(base)
      base.alias_method :extract_request_environment_without_site, :extract_request_environment
      base.alias_method :extract_request_environment, :extract_request_environment_with_site
    end

    def extract_request_environment_with_site(request)
      env = extract_request_environment_without_site(request)
      env.merge! :site => request.host
    end

  end
end

ActionController::Routing::RouteSet.send :include, MultiSite::RouteSetExtensions

Version data entries

126 entries across 126 versions & 2 rubygems

Version Path
trusty-cms-3.2.0 vendor/extensions/multi-site-extension/lib/multi_site/route_set_extensions.rb
trusty-cms-3.1.11 vendor/extensions/multi-site-extension/lib/multi_site/route_set_extensions.rb
trusty-cms-3.1.10 vendor/extensions/multi-site-extension/lib/multi_site/route_set_extensions.rb
trusty-cms-3.1.9 vendor/extensions/multi-site-extension/lib/multi_site/route_set_extensions.rb
trusty-multi-site-extension-3.1.0 lib/multi_site/route_set_extensions.rb
trusty-multi-site-extension-3.0.2 lib/multi_site/route_set_extensions.rb