Sha256: c624aa57f6bfb5b4363218ae6385b446627bcca956fddf266ab753135ebe49f8
Contents?: true
Size: 402 Bytes
Versions: 7
Compression:
Stored size: 402 Bytes
Contents
module Searchlogic module Condition class InclusiveDescendantOf < NestedSet def to_conditions(value) root = (value.is_a?(klass) ? value : klass.find(value)) rescue return ["(#{quoted_table_name}.#{quote_column_name(klass.left_column_name)} >= ? AND #{quoted_table_name}.#{quote_column_name(klass.right_column_name)} <= ?)", root.left, root.right] end end end end
Version data entries
7 entries across 7 versions & 2 rubygems