Permalink
Browse files

Add documentation for ActiveRecord::Observer.

The instructions about configuration covered only rails-specific usage.
  • Loading branch information...
1 parent 35edd18 commit 848c1b4f47dd64ea2ca1d4547f1d8a74214335c4 @kytrinyx kytrinyx committed Jul 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/lib/active_record/observer.rb
@@ -74,6 +74,12 @@ module ActiveRecord
#
# Observers will not be invoked unless you define these in your application configuration.
#
+ # If you are using Active Record outside Rails, activate the observers explicitly in a configuration or
+ # environment file:
+ #
+ # ActiveRecord::Base.add_observer CommentObserver.instance
+ # ActiveRecord::Base.add_observer SignupObserver.instance
+ #
# == Loading
#
# Observers register themselves in the model class they observe, since it is the class that

0 comments on commit 848c1b4

Please sign in to comment.