Use transactions
http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html
directly. Also, you can't have hashes with keys of the same name.
On Wed, May 10, 2017 at 3:16 AM, Idan Attias wrote:
> Hi,
>
> I thought that since this method accepts Hash /
Hi,
I thought that since this method accepts Hash / Array as objects to be
created, it can be useful to pass options too (mostly when passing array)
for example, "Model.create([{name: 'a', name: 'b'}], transaction: true)" can
create all objects or none of them.
another example is passing shared