lib/active_record/hierarchical_query/query.rb
# converts conditions given as a hash to proc
converts conditions given as a hash to proc
converts conditions given as a hash to proc
def conditions_to_proc(conditions)
        proc do |parent, child|
          conditions.map do |parent_expression, child_expression|
            parent_expression = parent[parent_expression] if parent_expression.is_a?(Symbol)
            child_expression = child[child_expression] if child_expression.is_a?(Symbol)
            Arel::Nodes::Equality.new(parent_expression, child_expression)
          end.reduce(:and)
        end
      end
def conditions_to_proc ( conditions ) proc do | parent , child | conditions . map do | parent_expression , child_expression | parent_expression = parent [ parent_expression ] if parent_expression . is_a? ( Symbol ) child_expression = child [ child_expression ] if child_expression . is_a? ( Symbol ) Arel :: Nodes :: Equality . new ( parent_expression , child_expression ) end . reduce ( :and ) end end
converts conditions given as a hash to proc
converts conditions given as a hash to proc
conditions
<not_specific>