Skip to content

Commit

Permalink
Update presenter to use link type rather than filterable
Browse files Browse the repository at this point in the history
  • Loading branch information
leenagupte committed Feb 25, 2025
1 parent afc41a3 commit 6c92a80
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/presenters/specialist_document_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def important_metadata
content_item.facet_values.each do |facet_value|
metadata[facet_value[:name]] = format_facet_value(facet_value[:type],
facet_value[:value],
facet_value[:key],
facet_value[:filterable])
facet_value[:key])
end

metadata
Expand Down Expand Up @@ -62,10 +61,10 @@ def statutory_instrument?
content_item.document_type == "statutory_instrument"
end

def format_facet_value(type, value, key, filterable)
def format_facet_value(type, value, key)
if type == "date"
view_context.display_date(value)
elsif type == "text" && value.is_a?(Array) && filterable == true
elsif type == "link"
value.map { |v| format_filterable_link(key, v[:value], v[:label]) }
else
value
Expand Down

0 comments on commit 6c92a80

Please sign in to comment.