abstract class ActiveModel::Model

Defined in:

active-model/model.cr

Constant Summary

FIELD_MAPPINGS = {} of Nil => Nil

Instance Method Summary

Macro Summary

Instance Method Detail

def apply_defaults #

Prevent compiler errors


[View source]

Macro Detail

macro __create_assign_attributes__ #

[View source]
macro __create_initializer__ #

[View source]
macro __customize_orm__ #

For overriding in parent classes


[View source]
macro __from_object_params__(params) #

[View source]
macro __map_json__ #

Adds the from_json method


[View source]
macro __process_attributes__ #

[View source]
macro __track_changes__ #

[View source]
macro attribute(name, converter = nil, mass_assignment = true, persistence = true, **tags) #

[View source]
macro enum_attribute(name, column_type = Int32, mass_assignment = true, persistence = true, **tags) #

Allow enum attributes. Persisted as either String | Int32


[View source]