Skip to content

Commit

Permalink
Silence deprecation on search_fields within the blacklight code
Browse files Browse the repository at this point in the history
This avoids deprecation warnings downstream while ensuring we preserve
overridden behavior until the deprecation goes into effect.

refs 009a426
  • Loading branch information
hackartisan authored and cbeer committed Jul 25, 2022
1 parent 47ba85d commit 70f89c0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/views/catalog/index.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ json.included do
end
end

json.array! search_fields do |(label, key)|
json.type 'search_field'
json.id key
json.attributes do
json.label label
end
json.links do
json.self url_for(search_state.to_h.merge(search_field: key, only_path: false))
Deprecation.silence(Blacklight::ConfigurationHelperBehavior) do
json.array! search_fields do |(label, key)|
json.type 'search_field'
json.id key
json.attributes do
json.label label
end
json.links do
json.self url_for(search_state.to_h.merge(search_field: key, only_path: false))
end
end
end

Expand Down

0 comments on commit 70f89c0

Please sign in to comment.