diff options
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/compatibility.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/base_test.rb | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 125dbf6bb5..9b0c8e0ce3 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -192,6 +192,10 @@ module ActionController super body end + def performed? + response_body + end + def dispatch(name, request) #:nodoc: @_request = request @_env = request.env diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index 7b73f86584..de3354d4f9 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -60,11 +60,5 @@ module ActionController def method_for_action(action_name) super || (respond_to?(:method_missing) && "_handle_method_missing") end - - def performed? - ActiveSupport::Deprecation.warn "Calling `performed?` is deprecated and will " \ - "be removed in Rails 4.0. Please check for `response_body` presence instead.", caller - response_body - end end end diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 76e5786e70..6e13aab518 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -116,6 +116,12 @@ class ControllerInstanceTests < Test::Unit::TestCase Submodule::ContainedNonEmptyController.new] end + def test_performed? + assert !@empty.performed? + @empty.response_body = ["sweet"] + assert @empty.performed? + end + def test_action_methods @empty_controllers.each do |c| assert_equal Set.new, c.class.action_methods, "#{c.controller_path} should be empty!" |