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

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



240
241
242
# File 'lib/awesome_nested_set/base.rb', line 240

def left_column_name
  acts_as_nested_set_options[:left_column]
end

#parent_column_nameObject



248
249
250
# File 'lib/awesome_nested_set/base.rb', line 248

def parent_column_name
  acts_as_nested_set_options[:parent_column]
end

#quoted_left_column_nameObject



256
257
258
# File 'lib/awesome_nested_set/base.rb', line 256

def quoted_left_column_name
  connection.quote_column_name(left_column_name)
end

#quoted_parent_column_nameObject



264
265
266
# File 'lib/awesome_nested_set/base.rb', line 264

def quoted_parent_column_name
  connection.quote_column_name(parent_column_name)
end

#quoted_right_column_nameObject



260
261
262
# File 'lib/awesome_nested_set/base.rb', line 260

def quoted_right_column_name
  connection.quote_column_name(right_column_name)
end

#quoted_scope_column_namesObject



268
269
270
# File 'lib/awesome_nested_set/base.rb', line 268

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

#right_column_nameObject



244
245
246
# File 'lib/awesome_nested_set/base.rb', line 244

def right_column_name
  acts_as_nested_set_options[:right_column]
end

#scope_column_namesObject



252
253
254
# File 'lib/awesome_nested_set/base.rb', line 252

def scope_column_names
  Array(acts_as_nested_set_options[:scope])
end