Browse files

add note about observer config for rails apps

ActiveModel::Observer and ActiveRecord::Observer have similar
documentation, but a Rails user looking at the ActiveModel version
might not realize that a change to config/application.rb is
required to activate the observer. This change adds a note to
that effect, pointing to the AR version from the AM version.
  • Loading branch information...
1 parent 5444ed5 commit bd7d8665a083f534f9d1aaa544d912f933b4fd61 @jimmycuadra jimmycuadra committed Feb 16, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 activemodel/lib/active_model/observing.rb
@@ -156,6 +156,10 @@ def notify_observers(method)
# The AuditObserver will now act on both updates to Account and Balance by treating
# them both as records.
+ # If you're using an Observer in a Rails application with Active Record, be sure to
+ # read about the necessary configuration in the documentation for
+ # ActiveRecord::Observer.
+ #
class Observer
include Singleton

0 comments on commit bd7d866

Please sign in to comment.