aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract/callbacks_test.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-03-09 01:15:17 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2019-03-20 13:28:18 +0100
commit2ea5c24085e39efb6c1bc6e7062bcc5f496d1fa6 (patch)
tree9a6448dca6dcd973957584686edf60961189ae01 /actionpack/test/abstract/callbacks_test.rb
parentc11d115fa3c58ec6bde5e9799673cee381d22d47 (diff)
downloadrails-2ea5c24085e39efb6c1bc6e7062bcc5f496d1fa6.tar.gz
rails-2ea5c24085e39efb6c1bc6e7062bcc5f496d1fa6.tar.bz2
rails-2ea5c24085e39efb6c1bc6e7062bcc5f496d1fa6.zip
Bulk Insert: Reuse indexes for unique_by
I found `:unique_by` with `:columns` and `:where` inside it tough to grasp. The documentation only mentioned indexes and partial indexes. So why duplicate a model's indexes in an insert_all/upsert_all call when we can just look it up? This has the added benefit of raising if no index is found, such that people can't insert thousands of records without relying on an index of some form.
Diffstat (limited to 'actionpack/test/abstract/callbacks_test.rb')
0 files changed, 0 insertions, 0 deletions