Browse Source

Merge pull request #97 from lexintegritastech/improve-main-ui

Fix `citation_finder#search` in `document`
pull/98/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
ca804bc736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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