diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-06-11 13:41:48 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-06-11 13:41:48 -0500 |
commit | 8f7c657f4b1c037348b24f0b9dd1e45099fbc760 (patch) | |
tree | e63be1eab2f2b8324475077eec71a42bcc591582 | |
parent | c4e440b1d2fa288490f550321cfeeb952264762f (diff) | |
download | rails-8f7c657f4b1c037348b24f0b9dd1e45099fbc760.tar.gz rails-8f7c657f4b1c037348b24f0b9dd1e45099fbc760.tar.bz2 rails-8f7c657f4b1c037348b24f0b9dd1e45099fbc760.zip |
Move observing notify helper into AMo
-rw-r--r-- | activemodel/lib/active_model/observing.rb | 6 | ||||
-rw-r--r-- | 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 |