Are after_create
and after_save
the same as per functionality?
I want to do an operation with the email of a user after its account creatio
after_save()
Works fine when you have to save models that do not save very often. For this particular example of changing records frequently it would be advisable to use
after_commit()
make sure that the model is saved in the database before the action is executed after_commit :calculate_credit_score
def calculate_credit_score
#Call a Cron job
end