Skip to content

Commit

Permalink
Do not deprecate performed.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 19, 2012
1 parent c4b8fd3 commit e2cc653
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions actionpack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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*

Expand Down
4 changes: 4 additions & 0 deletions actionpack/lib/action_controller/metal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions actionpack/test/controller/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down

1 comment on commit e2cc653

@carlosantoniodasilva
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Is any other code depending on it?

Please sign in to comment.