From de942e5534a26942e261a7699adc28597c5ad1bc Mon Sep 17 00:00:00 2001 From: Kamil Sobieraj Date: Tue, 4 Oct 2011 09:16:34 +0100 Subject: :subdomain can now be specified with a value of false in url_for, allowing for subdomain(s) removal from the host during link generation. Closes #2025 --- actionpack/lib/action_dispatch/routing/url_for.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing') diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb index 30048cd48a..8fc8dc191b 100644 --- a/actionpack/lib/action_dispatch/routing/url_for.rb +++ b/actionpack/lib/action_dispatch/routing/url_for.rb @@ -116,9 +116,10 @@ module ActionDispatch # If :only_path is false, this option must be # provided either explicitly, or via +default_url_options+. # * :subdomain - Specifies the subdomain of the link, using the +tld_length+ - # to split the domain from the host. - # * :domain - Specifies the domain of the link, using the +tld_length+ # to split the subdomain from the host. + # If false, removes all subdomains from the host part of the link. + # * :domain - Specifies the domain of the link, using the +tld_length+ + # to split the domain from the host. # * :tld_length - Number of labels the TLD id composed of, only used if # :subdomain or :domain are supplied. Defaults to # ActionDispatch::Http::URL.tld_length, which in turn defaults to 1. -- cgit v1.2.3