class Account
- Account
- Jennifer::Model::Base
- Jennifer::Model::Resource
- Reference
- Object
Defined in:
models/account.crConstructors
-
.new(values : Hash(Symbol, AttrType) | NamedTuple, new_record)
Accepts symbol hash or named tuple, stringify it and calls constructor with string-based keys hash.
Class Method Summary
Instance Method Summary
- #balance : Int32
- #balance!
- #balance=(_balance : Int32)
- #balance=(_balance : String)
- #balance=(_balance : AttrType)
- #balance_changed? : Bool
- #balance_will_change!
-
#destroy : Bool
Deletes object from db and calls all related callbacks.
- #id : Int32?
- #id!
- #id=(_id : Union(Int32, Nil))
- #id=(_id : String)
- #id=(_id : AttrType)
- #id_changed? : Bool
- #id_will_change!
- #limit_amount : Int32
- #limit_amount!
- #limit_amount=(_limit_amount : Int32)
- #limit_amount=(_limit_amount : String)
- #limit_amount=(_limit_amount : AttrType)
- #limit_amount_changed? : Bool
- #limit_amount_will_change!
- #limit_reached?
Constructor Detail
Accepts symbol hash or named tuple, stringify it and calls constructor with string-based keys hash.
Class Method Detail
Instance Method Detail
def destroy : Bool
#
Description copied from class Jennifer::Model::Base
Deletes object from db and calls all related callbacks.
It returns true
if the object was successfully deleted.
Contact.first!.destroy # => true