diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/models/data_list.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/models/data_list.rb')
-rw-r--r-- | app/models/data_list.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/data_list.rb b/app/models/data_list.rb index 12011cb17f7..2cee3447886 100644 --- a/app/models/data_list.rb +++ b/app/models/data_list.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class DataList - def initialize(batch, data_fields_hash, klass) - @batch = batch + def initialize(batch_ids, data_fields_hash, klass) + @batch_ids = batch_ids @data_fields_hash = data_fields_hash @klass = klass end @@ -13,13 +13,15 @@ class DataList private - attr_reader :batch, :data_fields_hash, :klass + attr_reader :batch_ids, :data_fields_hash, :klass def columns data_fields_hash.keys << 'service_id' end def values - batch.map { |row| data_fields_hash.values << row['id'] } + batch_ids.map do |row| + data_fields_hash.values << row['id'] + end end end |