Skip to content

Commit cc7d5ec

Browse files
author
dmitrii.buk
committed
each_record primary_key fix
1 parent c2516eb commit cc7d5ec

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
umbrellio-utils (1.6.0)
4+
umbrellio-utils (1.6.1)
55
memery (~> 1)
66

77
GEM

lib/umbrellio_utils/database.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_violated_constraint_name(exception)
2525
def each_record(dataset, primary_key: nil, **options, &block)
2626
primary_key = primary_key_from(dataset, primary_key:)
2727

28-
with_temp_table(dataset, **options) do |ids|
28+
with_temp_table(dataset, primary_key:, **options) do |ids|
2929
rows = ids.map { |id| row(id.is_a?(Hash) ? id.values : [id]) }
3030
dataset.model.where(row(primary_key) => rows).reverse(row(primary_key)).each(&block)
3131
end

lib/umbrellio_utils/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module UmbrellioUtils
4-
VERSION = "1.6.0"
4+
VERSION = "1.6.1"
55
end

0 commit comments

Comments
 (0)