abstract class Granite::Base

Overview

Granite::Base is the base class for your model objects.

Included Modules

Extended Modules

Defined in:

granite/base.cr

Instance methods inherited from module Granite::Validators

errors errors, valid? valid?

Instance methods inherited from module Granite::Transactions

destroy destroy, destroy! destroy!, save(*, validate : Bool = true) save, save!(*, validate : Bool = true) save!, set_timestamps(*, to time = Time.local(Granite.settings.default_timezone), mode = :create) set_timestamps, touch(*fields) : Bool touch, update(args : Granite::ModelArgs)
update(**args)
update
, update!(args : Granite::ModelArgs)
update!(**args)
update!

Instance methods inherited from module Granite::Columns

content_values : Array(Granite::Columns::Type) content_values, from_rs(result : DB::ResultSet) : Nil from_rs, primary_key_value primary_key_value, read_attribute(attribute_name : Symbol | String) : Type read_attribute, set_attributes(hash : Hash(String | Symbol, Type)) : self set_attributes, to_h to_h

Instance methods inherited from module Granite::Callbacks

abort!(message = "Aborted at #{@_current_callback}.") abort!