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, skip_timestamps : Bool = false)
The save method will check to see if the primary key exists yet.
- #save!(*, validate : Bool = true, skip_timestamps : Bool = false)
- #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, skip_timestamps : Bool = false)
- #update(**args)
- #update!(args, skip_timestamps : Bool = false)
- #update!(**args)
Instance Method Detail
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.