diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index 868396330b..7bad2397ae 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -58,6 +58,12 @@ module ActiveModel notify_observers :observed_class_inherited, subclass end end + + private + def notify(method) #:nodoc: + self.class.changed + self.class.notify_observers(method, self) + end end class Observer diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 36f5f2ce47..01e41c04df 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -353,10 +353,5 @@ module ActiveRecord return result end - - def notify(method) #:nodoc: - self.class.changed - self.class.notify_observers(method, self) - end end end