diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/routing.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb index 751dbb88d3..e0857fb2b1 100644 --- a/actionpack/lib/action_dispatch/routing.rb +++ b/actionpack/lib/action_dispatch/routing.rb @@ -276,6 +276,10 @@ module ActionDispatch end class << self + def controller_constraints + Regexp.union(*possible_controllers.collect { |n| Regexp.escape(n) }) + end + # Expects an array of controller names as the first argument. # Executes the passed block with only the named controllers named available. # This method is used in internal Rails testing. |