lib/fertile_forest/modules/finders.rb
#
# Find all root nodes in grove.
#
# @param  grove_id [Integer|nil] Grove ID to find.
# @param  columns [Array] Columns for SELECT clause.
# @return [ActiveRecord::Relation] Query for finding nodes.
# @todo   Pagination.
#
Find all root nodes in grove.
Find all root nodes in grove .
def roots(grove_id = nil, columns = nil)
            grove_id = grove_id.to_i
            ffdd = arel_table[@_ff_depth]
            ff_usual_conditions_scope(grove_id)
                .ff_usual_order_scope()
                .where(ffdd.eq(ROOT_DEPTH))
          end
def roots ( grove_id = nil , columns = nil ) grove_id = grove_id . to_i ffdd = arel_table [ @_ff_depth ] ff_usual_conditions_scope ( grove_id ) . ff_usual_order_scope ( ) . where ( ffdd . eq ( ROOT_DEPTH ) ) end
Find all root nodes in grove.
Find all root nodes in grove .
Query for finding nodes.
Query for finding nodes .
ActiveRecord::Relation
grove_id
Grove ID to find.
Grove ID to find .
columns
Columns for SELECT clause.
Columns for SELECT clause .
todo
None