- Link.where(head_uuid: itemuuids, link_class: ["tag", "identifier"]).each do |tag|
- selectables.each do |selectable|
- if selectable['uuid'] == tag.head_uuid
- selectable['name'] += ' [' + tag.name + ']'
+
+ itemuuids.each do |itemuuid|
+ links_for_object(itemuuid).each do |link|
+ if link.link_class.in? ["tag", "identifier"]
+ selectables.each do |selectable|
+ if selectable['uuid'] == tag.head_uuid
+ selectable['name'] += ' [' + tag.name + ']'
+ end
+ end