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
Rails 5.1+ way:
user = User.new user.save! user.saved_change_to_attribute?(:id) # => true