I’m new to Ruby on Rails but I wonder if there is possibility to change default name of “created_at” column (a attribute used to store date and time of creation of new object) to column named eg. “published_at” with no change in its functionality.
Share
No, you can’t. The following fields have a special meaning in Rails
created_at,created_onupdated_at,updated_onThis convention is hard-coded in several parts of the ActiveRecord codebase and, as of ActiveRecord 3.1, this behavior is not configurable using settings.
If one (or more) of these fields exist, it is updated on creation/modification of a record. You need to find a different name for your functionality.