aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/observing.rb
diff options
context:
space:
mode:
authorJimmy Cuadra <jimmy@jimmycuadra.com>2011-02-16 14:15:48 -0800
committerJimmy Cuadra <jimmy@jimmycuadra.com>2011-02-16 14:15:48 -0800
commitbd7d8665a083f534f9d1aaa544d912f933b4fd61 (patch)
treeafbd71edec53ef90c00f9cd8b9af2eb2cf37adb5 /activemodel/lib/active_model/observing.rb
parent5444ed56ab38a742b3ddf6612eadd8cf50d8d517 (diff)
downloadrails-bd7d8665a083f534f9d1aaa544d912f933b4fd61.tar.gz
rails-bd7d8665a083f534f9d1aaa544d912f933b4fd61.tar.bz2
rails-bd7d8665a083f534f9d1aaa544d912f933b4fd61.zip
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.
Diffstat (limited to 'activemodel/lib/active_model/observing.rb')
-rw-r--r--activemodel/lib/active_model/observing.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb
index bf4fd0740c..dde3a882cf 100644
--- a/activemodel/lib/active_model/observing.rb
+++ b/activemodel/lib/active_model/observing.rb
@@ -156,6 +156,10 @@ module ActiveModel
# 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