From 8f7c657f4b1c037348b24f0b9dd1e45099fbc760 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 11 Jun 2009 13:41:48 -0500 Subject: [PATCH] Move observing notify helper into AMo --- activemodel/lib/active_model/observing.rb | 6 ++++++ activerecord/lib/active_record/callbacks.rb | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) 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