lib/searchlogic/condition/descendant_of.rb in searchlogic-1.6.0 vs lib/searchlogic/condition/descendant_of.rb in searchlogic-1.6.1
- old
+ new
@@ -2,10 +2,10 @@
module Condition
class DescendantOf < NestedSet
def to_conditions(value)
condition = InclusiveDescendantOf.new(klass, options)
condition.value = value
- merge_conditions(["#{quoted_table_name}.#{quote_column_name(klass.primary_key)} != ?", (value.is_a?(klass) ? value.send(klass.primary_key) : value)], condition.sanitize)
+ scope_condition(merge_conditions(["#{quoted_table_name}.#{quote_column_name(klass.primary_key)} != ?", (value.is_a?(klass) ? value.send(klass.primary_key) : value)], condition.sanitize))
end
end
end
end
\ No newline at end of file