diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-29 18:10:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-29 18:10:08 +0300 |
commit | 20fda899a62cc27a4d40a168640e7e926c69eb62 (patch) | |
tree | 8fa2bca2431010c15b681fdec8c0cfba2ad78885 /app/models/service_list.rb | |
parent | 933a571ac8c9ada219dd15079221ff3dba8043be (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/service_list.rb')
-rw-r--r-- | app/models/service_list.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/service_list.rb b/app/models/service_list.rb index 9cbc5e68059..5eca5f2bda1 100644 --- a/app/models/service_list.rb +++ b/app/models/service_list.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class ServiceList - def initialize(batch_ids, service_hash, association) - @batch_ids = batch_ids + def initialize(batch, service_hash, association) + @batch = batch @service_hash = service_hash @association = association end @@ -13,15 +13,15 @@ class ServiceList private - attr_reader :batch_ids, :service_hash, :association + attr_reader :batch, :service_hash, :association def columns - (service_hash.keys << "#{association}_id") + service_hash.keys << "#{association}_id" end def values - batch_ids.map do |id| - (service_hash.values << id) + batch.select(:id).map do |record| + service_hash.values << record.id end end end |