From 32cb7046b9787dad999f923487af3fdb9f79a06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serge=20H=C3=A4nni?= Date: Sat, 28 May 2022 17:45:20 +0200 Subject: [PATCH] Fix query attribute `Arel.sql` is required for interpolated queries. --- lib/seed_dump/dump_methods/enumeration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/seed_dump/dump_methods/enumeration.rb b/lib/seed_dump/dump_methods/enumeration.rb index 5489e28..fcec778 100644 --- a/lib/seed_dump/dump_methods/enumeration.rb +++ b/lib/seed_dump/dump_methods/enumeration.rb @@ -5,7 +5,7 @@ def active_record_enumeration(records, io, options) # If the records don't already have an order, # order them by primary key ascending. if !records.respond_to?(:arel) || records.arel.orders.blank? - records.order("#{records.quoted_table_name}.#{records.quoted_primary_key} ASC") + records.order(Arel.sql("#{records.quoted_table_name}.#{records.quoted_primary_key} ASC")) end num_of_batches, batch_size, last_batch_size = batch_params_from(records, options)