aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/observer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/observer.rb')
-rw-r--r--activerecord/lib/active_record/observer.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/observer.rb b/activerecord/lib/active_record/observer.rb
index 698b3ff412..74f76efe3f 100644
--- a/activerecord/lib/active_record/observer.rb
+++ b/activerecord/lib/active_record/observer.rb
@@ -44,6 +44,11 @@ module ActiveRecord
# == Available callback methods
#
# The observer can implement callback methods for each of the methods described in the Callbacks module.
+ #
+ # == Triggering Observers
+ #
+ # In order to activate an observer, you need to call Observer.instance. In Rails, this can be done in controllers
+ # using the short-hand of for example observer :comment_observer.
class Observer
include Singleton