aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/new_callbacks.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-11 11:48:38 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-11 11:48:38 -0700
commitc1d120a71e74aa3ccab6dc28a5406b87a51a69c1 (patch)
tree4a4935e3fe6c6479a85bb6f12fceb9ca76ca0865 /activesupport/lib/active_support/new_callbacks.rb
parent34caf4f5521897c5d656f8edcb3c4ae535d8e6d8 (diff)
downloadrails-c1d120a71e74aa3ccab6dc28a5406b87a51a69c1.tar.gz
rails-c1d120a71e74aa3ccab6dc28a5406b87a51a69c1.tar.bz2
rails-c1d120a71e74aa3ccab6dc28a5406b87a51a69c1.zip
Don't run the action if callbacks are halted.
In AbstractController, this means that response_body is not empty
Diffstat (limited to 'activesupport/lib/active_support/new_callbacks.rb')
-rw-r--r--activesupport/lib/active_support/new_callbacks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/new_callbacks.rb b/activesupport/lib/active_support/new_callbacks.rb
index 2ae7b006c7..9316d6d2b6 100644
--- a/activesupport/lib/active_support/new_callbacks.rb
+++ b/activesupport/lib/active_support/new_callbacks.rb
@@ -316,7 +316,7 @@ module ActiveSupport
each do |callback|
method << callback.start(key, options)
end
- method << "yield self if block_given?"
+ method << "yield self if block_given? && !halted"
reverse_each do |callback|
method << callback.end(key, options)
end