From 02a1a4edc8cce6a9f86ba56b4143e69cf25c2f7e Mon Sep 17 00:00:00 2001 From: Andrew White Date: Mon, 28 Jun 2010 15:44:27 +0100 Subject: [PATCH] Add :controller and :action to the list of valid conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_dispatch/routing/route_set.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 10de4853c5..4b6d4fef97 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -203,6 +203,7 @@ module ActionDispatch self.default_url_options = {} self.request_class = request_class self.valid_conditions = request_class.public_instance_methods.select{ |m| m != "id" }.map{ |m| m.to_sym } + self.valid_conditions += [:controller, :action] @disable_clear_and_finalize = false clear!