abstract class ActiveModel::Model

Defined in:

active-model/model.cr

Class Method Summary

Instance Method Summary

Macro Summary

Class Method Detail

def self.from_trusted_json(json : IO | String) #

[View source]
def self.from_trusted_yaml(yaml : IO | String) #

[View source]

Instance Method Detail

def apply_defaults #

Stub methods to prevent compiler errors


[View source]
def changed? #

[View source]
def changed_attributes #

[View source]
def clear_changes_information #

[View source]

Macro Detail

macro __customize_orm__ #

For overriding in parent classes


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

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

Allow enum attributes. Persisted as either String | Int


[View source]