我正在尝试为我的项目生成Notification
并Message
在Task
我的项目中生成。我正在使用Mongoid 2
.
我创建了一个NotificationObserver
,在这个观察者中是否有可能Message
只观察和after_create
观察Task
两者。就像这里描述的那样:http: //jamesgolick.com/2009/8/5/observational-better-observers-for-activerecord.htmlafter_create
after_update
已经很长时间了,所以我认为它现在可能是开箱即用的,但我在文档中找不到它。