lib/searchlogic/named_scopes/column_conditions.rb in searchlogic-2.5.2 vs lib/searchlogic/named_scopes/column_conditions.rb in searchlogic-2.5.3
- old
+ new
@@ -194,16 +194,18 @@
}
else
searchlogic_lambda(column.type, :skip_conversion => options[:skip_conversion]) { |*values|
values.collect! { |value| value_with_modifier(value, options[:value_modifier]) }
- if does_not_equal && values == [nil]
- sql.gsub!('!=', 'IS NOT')
+ new_sql = if does_not_equal && values == [nil]
+ sql.gsub('!=', 'IS NOT')
elsif equals && values == [nil]
- sql.gsub!('=', 'IS')
+ sql.gsub('=', 'IS')
+ else
+ sql
end
- {:conditions => [sql, *values]}
+ {:conditions => [new_sql, *values]}
}
end
end
def value_with_modifier(value, modifier)
\ No newline at end of file