Created
February 8, 2016 22:28
-
-
Save DanThiffault/9f13c9419b9357259dc2 to your computer and use it in GitHub Desktop.
Bulk Arel inserts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bookMergeBlocks = BookMergeBlock.arel_table | |
im = Arel::InsertManager.new Arel::Table.engine | |
im.into bookMergeBlocks | |
im.select @raw_books.select(book.id,:book_id).uniq.arel | |
im.columns << bookMergeBlocks[:master_book_id] | |
im.columns << bookMergeBlocks[:duplicate_book_id] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment