Skip to content
Browse files

Add :controller and :action to the list of valid conditions

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent e4f9132 commit 02a1a4edc8cce6a9f86ba56b4143e69cf25c2f7e @pixeltrix pixeltrix committed with josevalim Jun 28, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_dispatch/routing/route_set.rb
View
1 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -203,6 +203,7 @@ def initialize(request_class = ActionDispatch::Request)
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!

0 comments on commit 02a1a4e

Please sign in to comment.
Something went wrong with that request. Please try again.