The #new_record? function determines if a record has been saved. But it is always false in the after_save hook. Is there a way to determine whether the record i
after_save
No rails magic here that I know of, you'll have to do it yourself. You could clean this up using a virtual attribute...
In your model class:
def before_save @was_a_new_record = new_record? return true end def after_save if @was_a_new_record ... end end