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:
parent
ee8dc39ebe
commit
e8059f562f
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue