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
1 changed files with 1 additions and 1 deletions

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: