-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
In Rails 5.2, when one generates a model using rails g model foo, the model gets the timestamps added by default to it in the generated migration.
Mongoid by default currently does not add timestamps by adding include Mongoid::Timestamps to the model. This behavior can be requested by specifying --timestamps option to rails g model.
To be consistent with Rails/ActiveRecord, Mongoid will also enable timestamps by default. The legacy behavior can be obtained by passing --no-timestamps to rails g model.
- links to