If you have DB columns created_at
and updated_at
Rails will automatically set those values when you create and update a model object. Is there a way to save the model without touching those columns?
I am bringing in some legacy data and I would like to set those values from the corresponding values in the (differently named) legacy data fields. I'm finding when I set them on the model and then save the model, Rails appears to override the incoming values.
Of course I could just name the Rails model columns differently to prevent that, but after the data is imported, I want Rails to do its automatic timestamp thing.