Marten::DB::Field::DateTime
Inherits Marten::DB::Field::Base / Reference / Object
Constructors
Instance methods
auto_now
Sourceauto_now?
Returns a boolean indicating if the field automatically sets the current time at record save time.
auto_now_add
Sourceauto_now_add?
Returns a boolean indicating if the field automatically sets the current time at record creation time.
Extracts the field value from a DB result set and returns the right object corresponding to this value.
prepare_save(record, new_record = false)
Runs pre-save logic for the specific field and record at hand.
This method does nothing by default but can be overridden for specific fields that need to set values on the model instance before save or perform any pre-save logic.