Fix disappearing tags issue

This commit is contained in:
Matt-Yorkley
2020-04-22 01:33:38 +02:00
parent 23f4faf192
commit 4ef61b642e

View File

@@ -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