Skip to content

Commit

Permalink
@request is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
lerrua committed Sep 10, 2010
1 parent a4996cd commit a97f2e0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/subdomain_fu/url_rewriter.rb
Expand Up @@ -4,10 +4,9 @@ module ActionDispatch
module Routing
class RouteSet #:nodoc:
def url_for_with_subdomains(options, path_segments=nil)
raise @request.inspect
if SubdomainFu.needs_rewrite?(options[:subdomain], (options[:host] || @request.host_with_port)) || options[:only_path] == false
if SubdomainFu.needs_rewrite?(options[:subdomain], (options[:host] || "#{host}#{port_string}")) || options[:only_path] == false
options[:only_path] = false if SubdomainFu.override_only_path?
options[:host] = SubdomainFu.rewrite_host_for_subdomains(options.delete(:subdomain), options[:host] || @request.host_with_port)
options[:host] = SubdomainFu.rewrite_host_for_subdomains(options.delete(:subdomain), options[:host] || "#{host}#{port_string}")
# puts "options[:host]: #{options[:host].inspect}"
else
options.delete(:subdomain)
Expand Down

0 comments on commit a97f2e0

Please sign in to comment.