Permalink
Browse files

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.
  • Loading branch information...
1 parent ee8dc39 commit e8059f562ff56b469ae3eab99edaa5422be2e661 @pixeltrix pixeltrix committed May 15, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/route_set.rb
View
2 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -157,7 +157,7 @@ def self.create(route, options)
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:

0 comments on commit e8059f5

Please sign in to comment.