mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add documentation for ActiveRecord::Observer.
The instructions about configuration covered only rails-specific usage.
This commit is contained in:
parent
35edd185e1
commit
848c1b4f47
1 changed files with 6 additions and 0 deletions
|
@ -74,6 +74,12 @@ module ActiveRecord
|
||||||
#
|
#
|
||||||
# Observers will not be invoked unless you define these in your application configuration.
|
# 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
|
# == Loading
|
||||||
#
|
#
|
||||||
# Observers register themselves in the model class they observe, since it is the class that
|
# Observers register themselves in the model class they observe, since it is the class that
|
||||||
|
|
Loading…
Reference in a new issue