module Granite::Transactions
Direct including types
Defined in:
granite/transactions.crInstance Method Summary
-
#destroy
Destroy will remove this from the database.
- #destroy!
-
#save(*, validate : Bool = true)
The save method will check to see if the primary key exists yet.
- #save!(*, validate : Bool = true)
- #set_timestamps(*, to time = Time.local(Granite.settings.default_timezone), mode = :create)
-
#touch(*fields) : Bool
Saves the record with the updated_at/names fields updated to the current time.
- #update(args : Granite::ModelArgs)
- #update(**args)
- #update!(args : Granite::ModelArgs)
- #update!(**args)
Instance Method Detail
def save(*, validate : Bool = true)
#
The save method will check to see if the primary key exists yet. If it does it will call the update method, otherwise it will call the create method. This will update the timestamps appropriately.
def touch(*fields) : Bool
#
Saves the record with the updated_at/names fields updated to the current time.