Browse Source

Fix `citation_finder#search` in `document`

pull/97/head
alexdbondoc17 4 years ago
parent
commit
3f0e16feaa
  1. 2
      app/controllers/concerns/document_search.rb
  2. 2
      app/controllers/concerns/jurisprudence_search.rb

2
app/controllers/concerns/document_search.rb

@ -13,7 +13,7 @@ module DocumentSearch
without(:id).any_of(search_params[:exclude_ids]) if search_params[:exclude_ids].present? without(:id).any_of(search_params[:exclude_ids]) if search_params[:exclude_ids].present?
with(:citation_finders_names).any_of(search_params[:citation_finder]) if search_params[:citation_finder].present? with(:citation_finders_names).any_of([search_params[:citation_finder]]) if search_params[:citation_finder].present?
with(:is_only_in_premium_libraries, false) with(:is_only_in_premium_libraries, false)

2
app/controllers/concerns/jurisprudence_search.rb

@ -19,7 +19,7 @@ module JurisprudenceSearch
with(:subject_ids).any_of(search_params[:subject_ids].split(",").map(&:strip).map(&:to_i)) if search_params[:subject_ids].present? with(:subject_ids).any_of(search_params[:subject_ids].split(",").map(&:strip).map(&:to_i)) if search_params[:subject_ids].present?
with(:citation_finders_names).any_of(search_params[:citation_finder]) if search_params[:citation_finder].present? with(:citation_finders_names).any_of([search_params[:citation_finder]]) if search_params[:citation_finder].present?
without(:id).any_of(search_params[:exclude_ids]) if search_params[:exclude_ids].present? without(:id).any_of(search_params[:exclude_ids]) if search_params[:exclude_ids].present?

Loading…
Cancel
Save