diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-06-28 15:44:27 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-28 16:51:39 +0200 |
commit | 02a1a4edc8cce6a9f86ba56b4143e69cf25c2f7e (patch) | |
tree | b6ed8caff495605cdb14f581790c6a0296bcc2ef | |
parent | e4f9132f6a355de50511fcb75a5186a1a8af17e6 (diff) | |
download | rails-02a1a4edc8cce6a9f86ba56b4143e69cf25c2f7e.tar.gz rails-02a1a4edc8cce6a9f86ba56b4143e69cf25c2f7e.tar.bz2 rails-02a1a4edc8cce6a9f86ba56b4143e69cf25c2f7e.zip |
Add :controller and :action to the list of valid conditions
Signed-off-by: José Valim <jose.valim@gmail.com>
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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! |