diff --git a/app/controllers/admin/customers_controller.rb b/app/controllers/admin/customers_controller.rb index dac3b209dc..21942786bd 100644 --- a/app/controllers/admin/customers_controller.rb +++ b/app/controllers/admin/customers_controller.rb @@ -102,9 +102,11 @@ module Admin context: 'tags' }) customer_tags.each_with_object({}) do |tag, indexed_hash| - customer_id = tag.taggings.first.taggable_id - indexed_hash[customer_id] ||= [] - indexed_hash[customer_id] << tag.name + tag.taggings.each do |tagging| + customer_id = tagging.taggable_id + indexed_hash[customer_id] ||= [] + indexed_hash[customer_id] << tag.name + end end end end