From e8059f562ff56b469ae3eab99edaa5422be2e661 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 15 May 2014 06:30:42 +0100 Subject: 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. --- actionpack/lib/action_dispatch/routing/route_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index e79a96f0a7..e699419f23 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -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: -- cgit v1.2.3