abstract class Params

Included Modules

Direct Known Subclasses

Defined in:

controllers/utilities/params.cr

Constant Summary

AM_PARENT_TYPE = {:type => Params} of Nil => Nil

Class Method Summary

Instance Method Summary

Class Method Detail

def self.attributes : Array(Symbol) #

Returns all attribute keys.


Instance Method Detail

def apply_defaults #

Generate code to apply default values


def assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) #

Assign to mulitple attributes via HTTP::Params.


def assign_attributes #

Assign to multiple attributes.


def attributes #

Returns a Hash of all attribute values


def attributes_tuple #

Returns a NamedTuple of all attribute values.


def persistent_attributes #

Returns a Hash of all attributes that can be persisted.


def validate! #

Checks that the model is valid Responds with the validation errors


[View source]