提交 848c1b4f 编写于 作者: K Katrina Owen

Add documentation for ActiveRecord::Observer.

The instructions about configuration covered only rails-specific usage.
上级 35edd185
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册