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

Defined in:
lib/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

#left_column_nameObject



198
199
200
# File 'lib/awesome_nested_set.rb', line 198

def left_column_name
  acts_as_nested_set_options[:left_column]
end

#parent_column_nameObject



206
207
208
# File 'lib/awesome_nested_set.rb', line 206

def parent_column_name
  acts_as_nested_set_options[:parent_column]
end

#quoted_left_column_nameObject



214
215
216
# File 'lib/awesome_nested_set.rb', line 214

def quoted_left_column_name
  connection.quote_column_name(left_column_name)
end

#quoted_parent_column_nameObject



222
223
224
# File 'lib/awesome_nested_set.rb', line 222

def quoted_parent_column_name
  connection.quote_column_name(parent_column_name)
end

#quoted_right_column_nameObject



218
219
220
# File 'lib/awesome_nested_set.rb', line 218

def quoted_right_column_name
  connection.quote_column_name(right_column_name)
end

#quoted_scope_column_namesObject



226
227
228
# File 'lib/awesome_nested_set.rb', line 226

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

#right_column_nameObject



202
203
204
# File 'lib/awesome_nested_set.rb', line 202

def right_column_name
  acts_as_nested_set_options[:right_column]
end

#scope_column_namesObject



210
211
212
# File 'lib/awesome_nested_set.rb', line 210

def scope_column_names
  Array(acts_as_nested_set_options[:scope])
end