From f06c690dcca8328b46d2da049afddc77bb35ad87 Mon Sep 17 00:00:00 2001 From: Matthew Bernhardt Date: Tue, 18 Nov 2025 12:35:04 -0500 Subject: [PATCH] Fix bug that skips rendering single contributors ** Why are these changes being introduced: Our rendering of contributors from TIMDEX apparently has a bug that skips rendering anything if there is only one contributor on the record. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/use-214 ** How does this address that need: This adds an .each call to the .uniq filter that exists, which forces Rails to actually process the single resulting record in the case of a single contributor being present on the record. ** Document any side effects to this change: Hopefully none. --- app/views/shared/_contributors.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_contributors.html.erb b/app/views/shared/_contributors.html.erb index 9e0cf346..f951df65 100644 --- a/app/views/shared/_contributors.html.erb +++ b/app/views/shared/_contributors.html.erb @@ -1,5 +1,5 @@ <%= return if contributors.blank? %> -<% contributors.uniq do |contributor| %> +<% contributors.uniq.each do |contributor| %>
  • <%= link_to contributor['value'], results_path({ advanced: true, contributors: contributor['value'] }) %>
  • <% end %>