touch method:
Saves the record with the updated_at/on attributes set to the current time.
Product.last.touch # it will set update_at with current date and time
Product.last.touch(:last_signed_in) # it will set last_signed_in with current date and time
No comments:
Post a Comment