Sha256: ff9a3b7acfe731eb6834fc41340f1aa160a9c3fba45eb3e3100cc0e72f6f8582

Contents?: true

Size: 420 Bytes

Versions: 7

Compression:

Stored size: 420 Bytes

Contents

module Searchlogic
  module Condition
    class DescendantOf < NestedSet
      def to_conditions(value)
        condition = InclusiveDescendantOf.new(klass, options)
        condition.value = value
        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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
schof-searchlogic-0.0.2 lib/searchlogic/condition/descendant_of.rb
searchlogic-1.6.1 lib/searchlogic/condition/descendant_of.rb
searchlogic-1.6.4 lib/searchlogic/condition/descendant_of.rb
searchlogic-1.6.3 lib/searchlogic/condition/descendant_of.rb
searchlogic-1.6.2 lib/searchlogic/condition/descendant_of.rb
searchlogic-1.6.6 lib/searchlogic/condition/descendant_of.rb
searchlogic-1.6.5 lib/searchlogic/condition/descendant_of.rb