lib/fertile_forest/modules/finders.rb
#
# Find trunk (= ancestor) nodes from base node in ordered range.
#
# @param base_obj [Entity|Integer] Base node|id to find.
# @param range [Integer] Ordered range of trunk nodes.
#   -1:To designate as root node.
# @param columns [Array] Columns for SELECT clause.
# @return [ActiveRecord::Relation] Basic query for finding trunk nodes.
# @return [nil] No trunk nodes.
#
Find trunk (= ancestor) nodes from base node in ordered range.
Find trunk ( = ancestor ) nodes from base node in ordered range .
def ff_get_previous_queue(base_node)
            previous_node = ff_get_previous_node(base_node)
            return 0 if previous_node.blank?
            previous_node.ff_queue
          end
def ff_get_previous_queue ( base_node ) previous_node = ff_get_previous_node ( base_node ) return 0 if previous_node . blank? previous_node . ff_queue end
Find trunk (= ancestor) nodes from base node in ordered range.
Find trunk ( = ancestor ) nodes from base node in ordered range .
Basic query for finding trunk nodes.
Basic query for finding trunk nodes .
ActiveRecord::Relation
No trunk nodes.
No trunk nodes .
nil
base_node
<not_specific>
base_obj
<not_specific>
Base node|id to find.
Base node|id to find .
range
<not_specific>
Ordered range of trunk nodes. -1:To designate as root node.
Ordered range of trunk nodes . - 1 : To designate as root node .
columns
<not_specific>
Columns for SELECT clause.
Columns for SELECT clause .