method
insert
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
v5.0.0.1 -
Show latest stable
-
0 notes -
Class: ActiveRecord::ConnectionAdapters::DatabaseStatements
insert(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [])
public
Executes an INSERT query and returns the new record’s ID
id_value will be returned unless the value is nil, in which case the database will attempt to calculate the last inserted id and return that value.
If the next id was calculated in advance (as in Oracle), it should be passed in as id_value.