I am trying to call two methods on an after create, but putting them into an array doesn't work... i can't find anything in the rails docs or google... anyone with experience?
after_create [:do_this, :do_that]
does not work
No need to surround the methods in array. Simply use:
after_create :do_this, :and_then_this
Bonus Information: If a before_*
callback returns false, all the later callbacks and the associated action are cancelled. If an after_*
callback returns false, all the later callbacks are cancelled. Callbacks are generally run in the order they are defined, with the exception of callbacks defined as methods on the model, which are called last.
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