Skip to content
Browse files

Do not deprecate performed.

  • Loading branch information...
1 parent c4b8fd3 commit e2cc653876646850808a56940f50bd2238ea2c56 @josevalim josevalim committed Jan 19, 2012
Showing with 11 additions and 2 deletions.
  1. +1 −2 actionpack/CHANGELOG.md
  2. +4 −0 actionpack/lib/action_controller/metal.rb
  3. +6 −0 actionpack/test/controller/base_test.rb
View
3 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*
View
4 actionpack/lib/action_controller/metal.rb
@@ -186,6 +186,10 @@ def response_body=(val)
super body
end
+ def performed?
+ response_body
+ end
+
def dispatch(name, request) #:nodoc:
@_request = request
@_env = request.env
View
6 actionpack/test/controller/base_test.rb
@@ -93,6 +93,12 @@ def setup
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!"

1 comment on commit e2cc653

@carlosantoniodasilva
Ruby on Rails member

Why? Is any other code depending on it?

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