diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2014-05-15 06:30:42 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-05-15 06:30:42 +0100 |
commit | e8059f562ff56b469ae3eab99edaa5422be2e661 (patch) | |
tree | da8339f70eaac54bb18f3b967fd0e49481aef35e /actionpack | |
parent | ee8dc39ebe88b294496d731150a9fdca35d9478c (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
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: |