E
E
eldar_web2018-07-23 11:51:09
Ruby on Rails
eldar_web, 2018-07-23 11:51:09

How to make a multiple INSERT in a database in Rails with one request?

How can this be done?
Let's say there is an array of data that needs to be inserted and the Model itself

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Bordenyuk, 2018-07-23
@eldar_web

create can take an array of hashes as an argument.

A
Andrey Demidenko, 2018-07-23
@Dem1

bulk_insert or activerecord-import

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question