Edit created_at field in rails?

I was wondering if it is ok to edit the created_at value of a record in DB in rails?

Best, Elliot

+3
source share
1 answer

You can change any of the fields except the primary key field, usually id, at any time. This includes created_at or updated_at.

The created_at field is assigned before saving for the first time, if it is not already set, and the updated_at field is configured each time a record is saved.

+5
source

Source: https://habr.com/ru/post/1739342/


All Articles