diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-23 00:31:03 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-23 09:54:42 +0100 |
commit | 2fe43b694f36ddb2062a91eebe61a035147265b1 (patch) | |
tree | ea99e4fc380ce7b836a3a332337fbdaad4e4f84f /actionpack/lib/action_controller/metal/url_for.rb | |
parent | 9938a3fc78bf8e066d2cdfe17f3710e0e6b85a36 (diff) | |
download | rails-2fe43b694f36ddb2062a91eebe61a035147265b1.tar.gz rails-2fe43b694f36ddb2062a91eebe61a035147265b1.tar.bz2 rails-2fe43b694f36ddb2062a91eebe61a035147265b1.zip |
:subdomain, :domain and :tld_length options can now be used in url_for, allowing for easy manipulation of the host during link generation.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller/metal/url_for.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/url_for.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index 333eeaeffb..6fc0cf1fb8 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -6,7 +6,8 @@ module ActionController def url_options @_url_options ||= super.reverse_merge( - :host => request.host_with_port, + :host => request.host, + :port => request.optional_port, :protocol => request.protocol, :_path_segments => request.symbolized_path_parameters ).freeze @@ -20,5 +21,6 @@ module ActionController @_url_options end end + end end |