Skip to content

Commit

Permalink
Merge pull request sunspot#1004 from Adrian2112/ruby-3
Browse files Browse the repository at this point in the history
make find_in_batches parameters compatible with ruby 3

explicit splat for options
  • Loading branch information
mlh758 committed Jul 19, 2021
2 parents 99f2a0d + c4e8af6 commit 8169c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sunspot_rails/lib/sunspot/rails/searchable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def solr_index(opts={})

if options[:batch_size].to_i > 0
batch_counter = 0
self.includes(options[:include]).find_in_batches(options.slice(:batch_size, :start)) do |records|
self.includes(options[:include]).find_in_batches(**options.slice(:batch_size, :start)) do |records|

solr_benchmark(options[:batch_size], batch_counter += 1) do
Sunspot.index(records.select(&:indexable?))
Expand Down

0 comments on commit 8169c83

Please sign in to comment.