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

Defined in:
lib/awesome_nested_set/columns.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) depth_column_name



14
15
16
# File 'lib/awesome_nested_set/columns.rb', line 14

def depth_column_name
  acts_as_nested_set_options[:depth_column]
end

- (Object) left_column_name



6
7
8
# File 'lib/awesome_nested_set/columns.rb', line 6

def left_column_name
  acts_as_nested_set_options[:left_column]
end

- (Object) order_column



22
23
24
# File 'lib/awesome_nested_set/columns.rb', line 22

def order_column
  acts_as_nested_set_options[:order_column] || left_column_name
end

- (Object) parent_column_name



18
19
20
# File 'lib/awesome_nested_set/columns.rb', line 18

def parent_column_name
  acts_as_nested_set_options[:parent_column]
end

- (Object) quoted_depth_column_name



38
39
40
# File 'lib/awesome_nested_set/columns.rb', line 38

def quoted_depth_column_name
  ActiveRecord::Base.connection.quote_column_name(depth_column_name)
end

- (Object) quoted_left_column_full_name



58
59
60
# File 'lib/awesome_nested_set/columns.rb', line 58

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

- (Object) quoted_left_column_name



30
31
32
# File 'lib/awesome_nested_set/columns.rb', line 30

def quoted_left_column_name
  ActiveRecord::Base.connection.quote_column_name(left_column_name)
end

- (Object) quoted_order_column_name



50
51
52
# File 'lib/awesome_nested_set/columns.rb', line 50

def quoted_order_column_name
  ActiveRecord::Base.connection.quote_column_name(order_column)
end

- (Object) quoted_parent_column_full_name



66
67
68
# File 'lib/awesome_nested_set/columns.rb', line 66

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

- (Object) quoted_parent_column_name



42
43
44
# File 'lib/awesome_nested_set/columns.rb', line 42

def quoted_parent_column_name
  ActiveRecord::Base.connection.quote_column_name(parent_column_name)
end

- (Object) quoted_primary_key_column_full_name



54
55
56
# File 'lib/awesome_nested_set/columns.rb', line 54

def quoted_primary_key_column_full_name
  "#{quoted_table_name}.#{ActiveRecord::Base.connection.quote_column_name('id')}"
end

- (Object) quoted_right_column_full_name



62
63
64
# File 'lib/awesome_nested_set/columns.rb', line 62

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

- (Object) quoted_right_column_name



34
35
36
# File 'lib/awesome_nested_set/columns.rb', line 34

def quoted_right_column_name
  ActiveRecord::Base.connection.quote_column_name(right_column_name)
end

- (Object) quoted_scope_column_names



46
47
48
# File 'lib/awesome_nested_set/columns.rb', line 46

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

- (Object) right_column_name



10
11
12
# File 'lib/awesome_nested_set/columns.rb', line 10

def right_column_name
  acts_as_nested_set_options[:right_column]
end

- (Object) scope_column_names



26
27
28
# File 'lib/awesome_nested_set/columns.rb', line 26

def scope_column_names
  Array(acts_as_nested_set_options[:scope])
end