diff options
Diffstat (limited to 'activerecord/lib/active_record/callbacks.rb')
-rwxr-xr-x | activerecord/lib/active_record/callbacks.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 23675c3bd4..57745b344e 100755 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -328,6 +328,8 @@ module ActiveRecord private def callback(method) + notify(method) + callbacks_for(method).each do |callback| result = case callback when Symbol @@ -345,9 +347,10 @@ module ActiveRecord end return false if result == false end - - invoke_and_notify(method) - true + + send(method) if respond_to_without_attributes?(method) + + return true end def callbacks_for(method) @@ -355,8 +358,8 @@ module ActiveRecord end def invoke_and_notify(method) - send(method) if respond_to_without_attributes?(method) notify(method) + send(method) if respond_to_without_attributes?(method) end def notify(method) #:nodoc: |