abstract class Params
- Params
- ActiveModel::Model
- Reference
- Object
Included Modules
- ActiveModel::Validation
Direct Known Subclasses
Defined in:
controllers/utilities/params.crConstant Summary
-
AM_PARENT_TYPE =
{:type => Params} of Nil => Nil
Constructors
Class Method Summary
-
.attributes : Array(Symbol)
Returns all attribute keys.
Instance Method Summary
-
#apply_defaults
Generate code to apply default values
-
#assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Assign to mulitple attributes via
HTTP::Params
. -
#assign_attributes(model : Params)
Assign to multiple attributes from a model object
-
#assign_attributes
Assign to multiple attributes.
-
#attributes
Returns a
Hash
of all attribute values -
#attributes_tuple
Returns a
NamedTuple
of all attribute values. -
#persistent_attributes
Returns a
Hash
of all attributes that can be persisted. -
#validate!
Checks that the model is valid Responds with the validation errors
Constructor Detail
Class Method Detail
Instance Method Detail
def assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
#
Assign to mulitple attributes via HTTP::Params
.