Skip to content

Commit

Permalink
Add "missing" terms
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Nov 14, 2024
1 parent 508503e commit 95dadac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
5 changes: 4 additions & 1 deletion app/models/genome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ def source_attributes
return unless source_hash
return @source_attributes if @source_attributes

not_provided = ['not provided', 'unavailable', 'missing']
not_provided = [
'not provided', 'unavailable', 'missing', 'not applicable',
'-', 'n/a'
]
@source_attributes = {}
source_hash[:samples].each_value do |sample|
sample[:attributes].each do |key, value|
Expand Down
11 changes: 0 additions & 11 deletions app/views/genomes/_samples.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,6 @@
v.map! { |i| sanitize(i) }
end
%>
<%
# Value-based formatting
v.map! do |i|
case i
when /\Anot applicable\z/i, 'N/A'
content_tag(:span, i, class: 'text-danger')
else
i
end
end
%>
<%= v.join(' • ').html_safe %>
</div>
<% end %>
Expand Down

0 comments on commit 95dadac

Please sign in to comment.