class User
- User
- ApplicationRecord
- Jennifer::Model::Base
- Jennifer::Model::Resource
- Reference
- Object
Defined in:
models/user.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
- ._created_at
- ._first_name
- ._id
- ._language_code
- ._last_name
- ._telegram_id
- ._updated_at
- ._username
- .column_names : Array(String)
Instance Method Summary
- #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.
- #first_name : String
- #first_name!
- #first_name=(_first_name : String)
- #first_name=(_first_name : AttrType)
- #first_name_changed? : Bool
- #first_name_will_change!
- #id : Int64?
- #id!
- #id=(_id : Union(Int64, Nil))
- #id=(_id : String)
- #id=(_id : Int32)
- #id=(_id : AttrType)
- #id_changed? : Bool
- #id_will_change!
- #language_code : String?
- #language_code!
- #language_code=(_language_code : Union(String, Nil))
- #language_code=(_language_code : AttrType)
- #language_code_changed? : Bool
- #language_code_will_change!
- #last_name : String?
- #last_name!
- #last_name=(_last_name : Union(String, Nil))
- #last_name=(_last_name : AttrType)
- #last_name_changed? : Bool
- #last_name_will_change!
- #telegram_id : Int64
- #telegram_id!
- #telegram_id=(_telegram_id : Int64)
- #telegram_id=(_telegram_id : String)
- #telegram_id=(_telegram_id : Int32)
- #telegram_id=(_telegram_id : AttrType)
- #telegram_id_changed? : Bool
- #telegram_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!
- #username : String?
- #username!
- #username=(_username : Union(String, Nil))
- #username=(_username : AttrType)
- #username_changed? : Bool
- #username_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