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
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user