aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorStefan Kaes <stkaes@googlemail.com>2008-07-15 20:55:14 +0200
committerJeremy Kemper <jeremy@bitsweat.net>2008-07-15 16:48:16 -0700
commitfbef982e4b906b879240a35a1ecff447007da6b2 (patch)
tree9407da05ce88ead31191373fe9a62d85fc73155f /activerecord/lib
parentc7acfbb25d58c6cba85b819abdcec13470360c76 (diff)
downloadrails-fbef982e4b906b879240a35a1ecff447007da6b2.tar.gz
rails-fbef982e4b906b879240a35a1ecff447007da6b2.tar.bz2
rails-fbef982e4b906b879240a35a1ecff447007da6b2.zip
Observers not longer add an after_find method to the observed class.
[#625 state:resolved]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/observer.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/observer.rb b/activerecord/lib/active_record/observer.rb
index 25e0e61c69..c96e5f9d51 100644
--- a/activerecord/lib/active_record/observer.rb
+++ b/activerecord/lib/active_record/observer.rb
@@ -20,7 +20,7 @@ module ActiveRecord
# ActiveRecord::Base.observers = Cacher, GarbageCollector
#
# Note: Setting this does not instantiate the observers yet. +instantiate_observers+ is
- # called during startup, and before each development request.
+ # called during startup, and before each development request.
def observers=(*observers)
@observers = observers.flatten
end
@@ -130,11 +130,11 @@ module ActiveRecord
# Observers register themselves in the model class they observe, since it is the class that
# notifies them of events when they occur. As a side-effect, when an observer is loaded its
# corresponding model class is loaded.
- #
+ #
# Up to (and including) Rails 2.0.2 observers were instantiated between plugins and
- # application initializers. Now observers are loaded after application initializers,
+ # application initializers. Now observers are loaded after application initializers,
# so observed models can make use of extensions.
- #
+ #
# If by any chance you are using observed models in the initialization you can still
# load their observers by calling <tt>ModelObserver.instance</tt> before. Observers are
# singletons and that call instantiates and registers them.
@@ -189,7 +189,6 @@ module ActiveRecord
def add_observer!(klass)
klass.add_observer(self)
- klass.class_eval 'def after_find() end' unless klass.method_defined?(:after_find)
end
end
end