aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG.md3
-rw-r--r--actionpack/lib/action_controller/metal.rb4
-rw-r--r--actionpack/test/controller/base_test.rb6
3 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 382a3cbd1d..33b02efa04 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,4 +1,5 @@
## Rails 4.0.0 (unreleased) ##
+
* Add `config.action_view.logger` to configure logger for ActionView. *Rafael França*
* Deprecated ActionController::Integration in favour of ActionDispatch::Integration
@@ -33,8 +34,6 @@
* Deprecate method_missing handling for not found actions, use action_missing instead. *Carlos Antonio da Silva*
-* Deprecate ActionController#performed?, check for response_body presence instead. *Carlos Antonio da Silva*
-
* Deprecate ActionController#rescue_action, ActionController#initialize_template_class, and ActionController#assign_shortcuts.
These methods were not being used internally anymore and are going to be removed in Rails 4. *Carlos Antonio da Silva*
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb
index 3aab77a069..691fb24d0f 100644
--- a/actionpack/lib/action_controller/metal.rb
+++ b/actionpack/lib/action_controller/metal.rb
@@ -186,6 +186,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/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index b95a524612..70e03d24ea 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -93,6 +93,12 @@ class ControllerInstanceTests < ActiveSupport::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!"