module Marten::Handlers::RecordRetrieving::ClassMethods
Defined in:
marten/handlers/concerns/record_retrieving.crInstance Method Summary
-
#lookup_field(lookup_field : String | Symbol)
Allows to configure the name of the model field that will be used to retrieve the record.
-
#lookup_param(lookup_param : String | Symbol)
Allows to configure the name of the URL parameter containing the ID used to retrieve the record.
-
#lookup_param : String
Returns the the name of the URL parameter containing the ID used to retrieve the record.
-
#model(model : DB::Model.class | Nil)
Allows to configure the model class that should be used to retrieve the record.
Instance Method Detail
Allows to configure the name of the model field that will be used to retrieve the record.
Allows to configure the name of the URL parameter containing the ID used to retrieve the record.
Returns the the name of the URL parameter containing the ID used to retrieve the record.
By default, the lookup param name corresponds to the value returned by #lookup_field
.
Allows to configure the model class that should be used to retrieve the record.