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
Thanks
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With