Browse Source

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

Improve `search` for `documents` and `annotations`
pull/99/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
204097ca6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/controllers/concerns/annotation_search.rb
  2. 4
      app/models/cdao/document.rb

2
app/controllers/concerns/annotation_search.rb

@ -9,6 +9,8 @@ module AnnotationSearch
with field, search_params[field] if search_params[field].present? with field, search_params[field] if search_params[field].present?
end end
order_by :created_at, :desc
paginate page: search_params[:page] || 1, per_page: search_params[:per_page] || 20 paginate page: search_params[:page] || 1, per_page: search_params[:per_page] || 20
end end

4
app/models/cdao/document.rb

@ -77,6 +77,8 @@ class Cdao::Document < Cdao::Base
is_only_in_premium_libraries? is_only_in_premium_libraries?
end end
string :citation_finders_names, multiple: true string :citation_finders_names, multiple: true do
citation_finders_names
end
end end
end end

Loading…
Cancel
Save