reenable select boxes for filter by facets

This commit is contained in:
Lars Henrik Mai 2015-06-22 21:33:40 +02:00 committed by Andreas Haller
parent 2caec3d721
commit 2b7ab65432
5 changed files with 21 additions and 9 deletions

View file

@ -64,8 +64,8 @@ class Paper < ActiveRecord::Base
# filters
filter do
bool do
must { term paper_type: options[:paper_type] } if options[:paper_type]
must { term originator: options[:originator] } if options[:originator]
must { term paper_type: options[:paper_type] } if options[:paper_type].present?
must { term originator: options[:originator] } if options[:originator].present?
# catchall when no filters set
must { match_all } if options.keys.none? {|k| [:paper_type, :originator].include?(k) }
end