Method: Ancestry::MaterializedPath#inpath_of

Defined in:
lib/ancestry/materialized_path.rb

#inpath_of(object) ⇒ Object



24
25
26
27
28
# File 'lib/ancestry/materialized_path.rb', line 24

def inpath_of(object)
  t = arel_table
  node = to_node(object)
  where(t[primary_key].in(node.path_ids))
end