Marten::DB::Field::Slug
Inherits Marten::Core::Sluggable / Marten::DB::Field::String / Marten::DB::Field::Base / Reference / Object
Represents a slug field.
Constructors
Instance methods
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.
validate(record, value)
Runs custom validation logic for a specific model field and model object.
This method should be overriden for each field implementation that requires custom validation logic.
Macros
check_definition(field_id, kwargs)
Source