method

create!

Importance_1
v6.1.3.1 - Show latest stable - 0 notes - Class: ClassMethods
create!(attributes = nil, &block) public

Creates an object (or multiple objects) and saves it to the database, if validations pass. Raises a RecordInvalid error if validations fail, unlike Base#create.

The attributes parameter can be either a Hash or an Array of Hashes. These describe which attributes to be created on the object, or multiple objects when given an Array of Hashes.

Show source
Register or log in to add new notes.