rails observer custom callback
How to implement custom call_back and then register method into observer?
If we use transaction into the model, is after_create is triggered for every single record inside the transaction or is triggered after transaction is finished?
Using Rails 3
Than开发者_如何学编程ks
You add the method, say, :after_something to your observer, and then issue notify_observers(:after_something) in your code in model. The method will receive the model instance as a parameter.
after_create is called for the observer of the class which instance was created. Each instance.
精彩评论