Permalink
Browse files

Refactored, making any/all scope_options more consistent with other s…

…cope_options.

Signed-off-by: Ben Johnson <bjohnson@binarylogic.com>
  • Loading branch information...
1 parent b1bd886 commit 8d0fd113c86efaf633e2af1e84a596766d98c9da laserlemon committed with Aug 19, 2009
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/searchlogic/named_scopes/conditions.rb
@@ -150,10 +150,8 @@ def scope_options(condition, column_type, sql, value_modifier = nil)
return {} if values.empty?
values.flatten!
- values.collect! { |value| value_with_modifier(value, value_modifier) }
-
join = $1 == "any" ? " OR " : " AND "
- {:conditions => [values.collect { |value| sql }.join(join), *values]}
+ {:conditions => [values.collect { |value| sql }.join(join), *values.collect { |value| value_with_modifier(value, value_modifier) }]}
}
else
searchlogic_lambda(column_type) { |value| {:conditions => [sql, value_with_modifier(value, value_modifier)]} }

0 comments on commit 8d0fd11

Please sign in to comment.