Module: SubdomainFu::RouteSetExtensions

Defined in:
lib/subdomain_fu/routing_extensions.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



21
22
23
# File 'lib/subdomain_fu/routing_extensions.rb', line 21

def self.included(base)
  base.alias_method_chain :extract_request_environment, :subdomain
end

Instance Method Details

#extract_request_environment_with_subdomain(request) ⇒ Object



25
26
27
28
# File 'lib/subdomain_fu/routing_extensions.rb', line 25

def extract_request_environment_with_subdomain(request)
  env = extract_request_environment_without_subdomain(request)
  env.merge(:host => request.host, :domain => request.domain, :subdomain => SubdomainFu.current_subdomain(request))
end