If you have the created_at and updated_at DB created_at , Rails will automatically set these values ββwhen creating and updating the model object. Is there a way to save the model without touching these columns?
I am citing some stale data, and I would like to set these values ββfrom the corresponding values ββin (differently) stale data. I find when I install them on the model and then save the model, Rails seems to override the input values.
Of course, I could just name the columns of the Rails model differently to prevent this, but after importing the data, I want Rails to execute its automatic timestamp.
ruby timestamp ruby-on-rails activerecord
Ethan May 14 '09 at 3:40 a.m. 2009-05-14 03:40
source share