Module: ActsAsOrderedTree::Columns

Extended by:
ActiveSupport::Concern
Defined in:
lib/acts_as_ordered_tree.rb

Overview

Mixed into both classes and instances to provide easy access to the column names

Instance Method Summary collapse

Instance Method Details

#children_counter_cache_columnObject


109
110
111
# File 'lib/acts_as_ordered_tree.rb', line 109

def children_counter_cache_column
  acts_as_ordered_tree_options[:counter_cache] || nil
end

#depth_columnObject


105
106
107
# File 'lib/acts_as_ordered_tree.rb', line 105

def depth_column
  acts_as_ordered_tree_options[:depth_column] || nil
end

#parent_columnObject


97
98
99
# File 'lib/acts_as_ordered_tree.rb', line 97

def parent_column
  acts_as_ordered_tree_options[:parent_column]
end

#position_columnObject


101
102
103
# File 'lib/acts_as_ordered_tree.rb', line 101

def position_column
  acts_as_ordered_tree_options[:position_column]
end

#scope_column_namesObject


113
114
115
# File 'lib/acts_as_ordered_tree.rb', line 113

def scope_column_names
  Array(acts_as_ordered_tree_options[:scope]).compact
end