aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorScott Barron <scott@elitists.net>2005-09-28 00:09:50 +0000
committerScott Barron <scott@elitists.net>2005-09-28 00:09:50 +0000
commit83b390bcfcded8bd5263883ddf741ef35bccc801 (patch)
tree99afdd1d134bd6cc7404c2d2f96e6466572158a7 /activerecord/lib/active_record
parent8e78e9335b6b6e86d5a55f9d00ea0ab699268cc5 (diff)
downloadrails-83b390bcfcded8bd5263883ddf741ef35bccc801.tar.gz
rails-83b390bcfcded8bd5263883ddf741ef35bccc801.tar.bz2
rails-83b390bcfcded8bd5263883ddf741ef35bccc801.zip
Returning false in before_destroy should cancel action. Closes #1829.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/callbacks.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb
index 8e3aac6e36..fb428c3f31 100755
--- a/activerecord/lib/active_record/callbacks.rb
+++ b/activerecord/lib/active_record/callbacks.rb
@@ -345,9 +345,9 @@ module ActiveRecord
return false if result == false
end
- send(method) if respond_to_without_attributes?(method)
+ result = send(method) if respond_to_without_attributes?(method)
- return true
+ return result
end
def callbacks_for(method)