aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/route_set.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-05-15 06:30:42 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2014-05-15 06:30:42 +0100
commite8059f562ff56b469ae3eab99edaa5422be2e661 (patch)
treeda8339f70eaac54bb18f3b967fd0e49481aef35e /actionpack/lib/action_dispatch/routing/route_set.rb
parentee8dc39ebe88b294496d731150a9fdca35d9478c (diff)
downloadrails-e8059f562ff56b469ae3eab99edaa5422be2e661.tar.gz
rails-e8059f562ff56b469ae3eab99edaa5422be2e661.tar.bz2
rails-e8059f562ff56b469ae3eab99edaa5422be2e661.zip
Only path requirements are relevant to optimized urls
The bit of URL generation that is optimized is the generation of the path so things like :host, :port, etc. are irrelevant.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index e79a96f0a7..e699419f23 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -157,7 +157,7 @@ module ActionDispatch
end
def self.optimize_helper?(route)
- !route.glob? && route.requirements.except(:controller, :action, :host).empty?
+ !route.glob? && route.path.requirements.empty?
end
class OptimizedUrlHelper < UrlHelper # :nodoc: