1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Andrew White 2014-05-15 06:30:42 +01:00
parent ee8dc39ebe
commit e8059f562f

View file

@ -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: