aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/callbacks.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-06 18:58:19 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-06 18:58:19 -0300
commitc539cc006179c98d418c6914ce567f657b6f1966 (patch)
tree16855e039ebab046747325dd5083c37bdba58616 /activerecord/lib/active_record/callbacks.rb
parenta956ec964078ee533644fae2a99e68eda0a7c9d5 (diff)
parentbdc1d329d4eea823d07cf010064bd19c07099ff3 (diff)
downloadrails-c539cc006179c98d418c6914ce567f657b6f1966.tar.gz
rails-c539cc006179c98d418c6914ce567f657b6f1966.tar.bz2
rails-c539cc006179c98d418c6914ce567f657b6f1966.zip
Merge pull request #19448 from tgxworld/fix_activesupport_callbacks_clash_on_run
Fix AS::Callbacks raising an error when `:run` callback is defined.
Diffstat (limited to 'activerecord/lib/active_record/callbacks.rb')
-rw-r--r--activerecord/lib/active_record/callbacks.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb
index f44e5af5de..2fcba8e309 100644
--- a/activerecord/lib/active_record/callbacks.rb
+++ b/activerecord/lib/active_record/callbacks.rb
@@ -289,25 +289,24 @@ module ActiveRecord
end
def destroy #:nodoc:
- _run_destroy_callbacks { super }
+ run_callbacks(:destroy) { super }
end
def touch(*) #:nodoc:
- _run_touch_callbacks { super }
+ run_callbacks(:touch) { super }
end
private
-
def create_or_update(*) #:nodoc:
- _run_save_callbacks { super }
+ run_callbacks(:save) { super }
end
def _create_record #:nodoc:
- _run_create_callbacks { super }
+ run_callbacks(:create) { super }
end
def _update_record(*) #:nodoc:
- _run_update_callbacks { super }
+ run_callbacks(:update) { super }
end
end
end