Module: CollectiveIdea::Acts::NestedSet::Columns

Defined in:
lib/awesome_nested_set/awesome_nested_set.rb

Overview

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) depth_column_name



693
694
695
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 693

def depth_column_name
  acts_as_nested_set_options[:depth_column]
end

- (Object) left_column_name



685
686
687
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 685

def left_column_name
  acts_as_nested_set_options[:left_column]
end

- (Object) order_column



701
702
703
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 701

def order_column
  acts_as_nested_set_options[:order_column] || left_column_name
end

- (Object) parent_column_name



697
698
699
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 697

def parent_column_name
  acts_as_nested_set_options[:parent_column]
end

- (Object) quoted_depth_column_name



717
718
719
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 717

def quoted_depth_column_name
  connection.quote_column_name(depth_column_name)
end

- (Object) quoted_left_column_full_name



729
730
731
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 729

def quoted_left_column_full_name
  "#{quoted_table_name}.#{quoted_left_column_name}"
end

- (Object) quoted_left_column_name



709
710
711
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 709

def quoted_left_column_name
  connection.quote_column_name(left_column_name)
end

- (Object) quoted_parent_column_full_name



737
738
739
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 737

def quoted_parent_column_full_name
  "#{quoted_table_name}.#{quoted_parent_column_name}"
end

- (Object) quoted_parent_column_name



721
722
723
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 721

def quoted_parent_column_name
  connection.quote_column_name(parent_column_name)
end

- (Object) quoted_right_column_full_name



733
734
735
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 733

def quoted_right_column_full_name
  "#{quoted_table_name}.#{quoted_right_column_name}"
end

- (Object) quoted_right_column_name



713
714
715
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 713

def quoted_right_column_name
  connection.quote_column_name(right_column_name)
end

- (Object) quoted_scope_column_names



725
726
727
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 725

def quoted_scope_column_names
  scope_column_names.collect {|column_name| connection.quote_column_name(column_name) }
end

- (Object) right_column_name



689
690
691
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 689

def right_column_name
  acts_as_nested_set_options[:right_column]
end

- (Object) scope_column_names



705
706
707
# File 'lib/awesome_nested_set/awesome_nested_set.rb', line 705

def scope_column_names
  Array(acts_as_nested_set_options[:scope])
end