app/views/catalog/index.json.jbuilder in blacklight-7.11.1 vs app/views/catalog/index.json.jbuilder in blacklight-7.12.0
- old
+ new
@@ -10,12 +10,12 @@
json.pages @presenter.pagination_info
end
json.data do
json.array! @presenter.documents do |document|
- doc_presenter = index_presenter(document)
- document_url = polymorphic_url(url_for_document(document))
+ doc_presenter = document_presenter(document)
+ document_url = Deprecation.silence(Blacklight::UrlHelperBehavior) { polymorphic_url(url_for_document(document)) }
json.id document.id
json.type doc_presenter.display_type.first
json.attributes do
doc_presenter.fields_to_render.each do |field_name, field, field_presenter|
json.partial! 'field', field: field,
@@ -47,13 +47,15 @@
json.label item.label
json.value item.value
json.hits item.hits
end
json.links do
- if facet_in_params?(facet.name, item.value)
- json.remove search_action_path(search_state.remove_facet_params(facet.name, item.value))
- else
- json.self path_for_facet(facet.name, item.value, only_path: false)
+ Deprecation.silence(Blacklight::FacetsHelperBehavior) do
+ if facet_in_params?(facet.name, item.value)
+ json.remove search_action_path(search_state.remove_facet_params(facet.name, item.value))
+ else
+ json.self path_for_facet(facet.name, item.value, only_path: false)
+ end
end
end
end
end
end