Open qszhu opened 5 years ago
Not sure whether this is the best way to do it. I added these so that I could write something like the following in a base model:
module Models::Base # ... def before_insert @created_at = @updated_at = Time.utc end def before_update @updated_at = Time.utc end end
Not sure whether this is the best way to do it. I added these so that I could write something like the following in a base model: