method

insert!

rails latest stable - Class: ActiveRecord::Relation

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

insert!(attributes, returning: nil, record_timestamps: nil)
public

Inserts a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

See #insert_all! for more.