From 8941831733fc56e2b1872f41c85cc48d782bb984 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 Oct 2015 16:18:12 -0700 Subject: Revert "ActionController::Base#process() now only takes an action name" This reverts commit 9f93a5efbba3e1cbf0bfa700a17ec8d1ef60d7c6. --- actionpack/test/abstract/callbacks_test.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'actionpack/test/abstract') diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb index b47aeaa08f..07571602e4 100644 --- a/actionpack/test/abstract/callbacks_test.rb +++ b/actionpack/test/abstract/callbacks_test.rb @@ -246,6 +246,26 @@ module AbstractController end end + class CallbacksWithArgs < ControllerWithCallbacks + set_callback :process_action, :before, :first + + def first + @text = "Hello world" + end + + def index(text) + self.response_body = @text + text + end + end + + class TestCallbacksWithArgs < ActiveSupport::TestCase + test "callbacks still work when invoking process with multiple arguments" do + controller = CallbacksWithArgs.new + controller.process(:index, " Howdy!") + assert_equal "Hello world Howdy!", controller.response_body + end + end + class AliasedCallbacks < ControllerWithCallbacks ActiveSupport::Deprecation.silence do before_filter :first -- cgit v1.2.3