Granite::Transactions::ClassMethods
Instance methods
Creates a new record, and attempts to save it to the database. Allows saving the record without timestamps. Returns the newly created record.
Creates a new record, and attempts to save it to the database. Returns the newly created record.
NOTE: This method still outputs the new object even when it failed to save
to the database. The only way to determine a failure is to check any errors on
the object, or to use #create!.
Creates a new record, and attempts to save it to the database. Allows saving
the record without timestamps. Returns the newly created record. Raises
Granite::RecordNotSaved if the save is unsuccessful.
Creates a new record, and attempts to save it to the database. Returns the
newly created record. Raises Granite::RecordNotSaved if the save is
unsuccessful.
Runs an INSERT statement for all records in model_array, with options to update any duplicate records, and provide column names.
Runs an INSERT statement for all records in model_array. the array must contain only one model class invalid model records will be skipped