From 8ed1a562c6293c81c894f3fe55fe88610c4f6caa Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 May 2014 10:55:59 -0700 Subject: "controllers" should be a valid path name --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 0a1f6afd77..67e7285dcd 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -117,7 +117,7 @@ module ActionDispatch options[$1.to_sym] ||= /.+?/ end - if path_without_format.match(':controller') + if path_pattern.names.map(&:to_sym).include?(:controller) raise ArgumentError, ":controller segment is not allowed within a namespace block" if scope[:module] # Add a default constraint for :controller path segments that matches namespaced -- cgit v1.2.3