Rails 6 bulk insert records
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 #records https://rubyonrails.ba/single/rails-6-bulk-insert-records