Skip to content

Commit

Permalink
Handle upcoming API change for publication attribute
Browse files Browse the repository at this point in the history
Wrap `sub.publication` in `Array().last` to ensure compatibility
with the upcoming API update. UI redesign needed for full support.
  • Loading branch information
alexskr committed Feb 27, 2025
1 parent d724c38 commit 2447a8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/layouts/_ontology_viewer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
= link_to(sub.documentation, class: 'btn btn-outline-secondary', "aria-label": "Documentation",
title: "Documentation", target: "_blank") do
%i.fas.fa-lg.fa-book-reader{"aria-hidden": true}
- unless sub.publication.nil?
= link_to(sub.publication, class: 'btn btn-outline-secondary', "aria-label": "Publications",
- unless Array(sub.publication).last.nil?
= link_to(Array(sub.publication).last, class: 'btn btn-outline-secondary', "aria-label": "Publications",
title: "Publications", target: "_blank") do
%i.far.fa-lg.fa-newspaper{"aria-hidden": true}
- if @ontology.admin?(session[:user])
Expand Down

0 comments on commit 2447a8a

Please sign in to comment.