class Items
- Items
- Jennifer::Model::Base
- Jennifer::Model::Resource
- Reference
- Object
Defined in:
models/items.crConstructors
- .new(it : CreateItemsDto, todo_id : Int32 | Nil)
-
.new(values : Hash(Symbol, AttrType) | NamedTuple)
Accepts symbol hash or named tuple, stringify it and calls constructor with string-based keys hash.
Class Method Summary
Instance Method Summary
- #checked : Bool?
- #checked!
- #checked=(_checked : Union(Bool, Nil))
- #checked=(_checked : String)
- #checked=(_checked : AttrType)
- #checked?
- #checked_changed? : Bool
- #checked_will_change!
- #created_at : Time?
- #created_at!
- #created_at=(_created_at : Union(Time, Nil))
- #created_at=(_created_at : String)
- #created_at=(_created_at : AttrType)
- #created_at_changed? : Bool
- #created_at_will_change!
-
#destroy : Bool
Deletes object from db and calls all related callbacks.
- #id : Int32?
- #id!
- #id=(_id : Int32 | Nil)
- #id=(_id : String)
- #id=(_id : AttrType)
- #id_changed? : Bool
- #id_will_change!
- #name : String
- #name!
- #name=(_name : String)
- #name=(_name : AttrType)
- #name_changed? : Bool
- #name_will_change!
- #todo
- #todo_id : Int32?
- #todo_id!
- #todo_id=(_todo_id : Union(Int32, Nil))
- #todo_id=(_todo_id : String)
- #todo_id=(_todo_id : AttrType)
- #todo_id_changed? : Bool
- #todo_id_will_change!
- #track_timestamps_on_create
- #track_timestamps_on_update
- #updated_at : Time?
- #updated_at!
- #updated_at=(_updated_at : Union(Time, Nil))
- #updated_at=(_updated_at : String)
- #updated_at=(_updated_at : AttrType)
- #updated_at_changed? : Bool
- #updated_at_will_change!
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