I have two after_create callbacks on the same model, and the 2nd one depends on an attribute (say client.score) not being nil. In the first one, it runs a calculation and sets that attribute in question to some non-nil value.
But it seems that even though I have them right after each other in my model file like this:
after_create :callback1
after_create :callback2
Whenever callback2 is run, it is still getting client.score to be nil.
How can I force the second one to be run after the first one?
You could do something like this
However, per the docs, your code sample should be fine too