app/helpers/spotlight/pages_helper.rb in blacklight-spotlight-0.23.0 vs app/helpers/spotlight/pages_helper.rb in blacklight-spotlight-0.24.0
- old
+ new
@@ -20,11 +20,11 @@
page_collection_name == 'about_pages' && @pages.empty?
end
def get_search_widget_search_results(block)
if block.searches?
- search_results(block.query_params.with_indifferent_access.merge(params))
+ search_results(search_widget_search_query(block))
else
[]
end
end
@@ -47,8 +47,16 @@
end
end
def render_contact_email_address(address)
mail_to address, address
+ end
+
+ private
+
+ def search_widget_search_query(block)
+ base_query = Blacklight::SearchState.new(block.query_params, blacklight_config)
+ user_query = Blacklight::SearchState.new(params, blacklight_config).to_h
+ base_query.params_for_search(user_query)
end
end
end