Skip to content

Commit

Permalink
Update query.rb
Browse files Browse the repository at this point in the history
Do not invalidate for operators that only need one of several values to be non-blank.
  • Loading branch information
zepheiryan committed Mar 29, 2013
1 parent dfb7785 commit 2acd08a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/query.rb
Expand Up @@ -95,7 +95,7 @@ def validate
filters.each_key do |field|
errors.add label_for(field), :blank unless
# filter requires one or more values
(values_for(field) and !values_for(field).first.blank?) or
(values_for(field) and !values_for(field).all?(&:blank?)) or
# filter doesn't require any value
["o", "c", "!*", "*", "t", "w"].include? operator_for(field)
end if filters
Expand Down

0 comments on commit 2acd08a

Please sign in to comment.