Rails 6 bulk insert records
28-Nov-2019 2190
There are cases when we want to insert records in bulk. For eg., we have a list of users in CSV and we want to import these users in our application.Rails has methods like delete_all or update_all to delete and update bulk records respectively. Similar method to insert bulk records was missing.Rails 6 added insert_all, insert_all! and upsert_all to ActiveRecord::Persistence, to solve the above issue.
Rails 6 bulk insert records #ruby #rubydeveloper #rubyonrails #Rails #insert #records #records https://www.rubyonrails.ba/link/rails-6-bulk-insert-records