Sha256: 8377af0d86444bee8d05fa17c4cad27d6bbb19b430a28dd4f6016ec4a00524b9

Contents?: true

Size: 416 Bytes

Versions: 4

Compression:

Stored size: 416 Bytes

Contents

module Searchgasm
  module Condition
    class InclusiveDescendantOf < Tree      
      def to_conditions(value)
        condition = DescendantOf.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, :any => true)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
searchgasm-1.5.2 lib/searchgasm/condition/inclusive_descendant_of.rb
searchgasm-1.5.0 lib/searchgasm/condition/inclusive_descendant_of.rb
searchgasm-1.5.1 lib/searchgasm/condition/inclusive_descendant_of.rb
searchgasm-1.5.3 lib/searchgasm/condition/inclusive_descendant_of.rb