Permalink
Browse files

Move observing notify helper into AMo

  • Loading branch information...
1 parent c4e440b commit 8f7c657f4b1c037348b24f0b9dd1e45099fbc760 @josh josh committed Jun 11, 2009
Showing with 6 additions and 5 deletions.
  1. +6 −0 activemodel/lib/active_model/observing.rb
  2. +0 −5 activerecord/lib/active_record/callbacks.rb
@@ -58,6 +58,12 @@ def inherited(subclass)
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
@@ -353,10 +353,5 @@ def callback(method)
return result
end
-
- def notify(method) #:nodoc:
- self.class.changed
- self.class.notify_observers(method, self)
- end
end
end

0 comments on commit 8f7c657

Please sign in to comment.