Module: CollectiveIdea::Acts::NestedSet::Base::Columns
- Defined in:
- lib/nested_set/base.rb
Overview
Mixed into both classes and instances to provide easy access to the column names
Instance Method Summary collapse
- #depth_column_name ⇒ Object
- #left_column_name ⇒ Object
- #parent_column_name ⇒ Object
- #primary_key_column_name ⇒ Object
- #quoted_depth_column_name ⇒ Object
- #quoted_left_column_name ⇒ Object
- #quoted_parent_column_name ⇒ Object
- #quoted_primary_key_column_name ⇒ Object
- #quoted_right_column_name ⇒ Object
- #quoted_scope_column_names ⇒ Object
- #right_column_name ⇒ Object
- #scope_column_names ⇒ Object
Instance Method Details
#depth_column_name ⇒ Object
325 326 327 |
# File 'lib/nested_set/base.rb', line 325 def depth_column_name [:depth_column] end |
#left_column_name ⇒ Object
309 310 311 |
# File 'lib/nested_set/base.rb', line 309 def left_column_name [:left_column] end |
#parent_column_name ⇒ Object
317 318 319 |
# File 'lib/nested_set/base.rb', line 317 def parent_column_name [:parent_column] end |
#primary_key_column_name ⇒ Object
329 330 331 |
# File 'lib/nested_set/base.rb', line 329 def primary_key_column_name [:primary_key_column] end |
#quoted_depth_column_name ⇒ Object
349 350 351 |
# File 'lib/nested_set/base.rb', line 349 def quoted_depth_column_name connection.quote_column_name(depth_column_name) end |
#quoted_left_column_name ⇒ Object
333 334 335 |
# File 'lib/nested_set/base.rb', line 333 def quoted_left_column_name connection.quote_column_name(left_column_name) end |
#quoted_parent_column_name ⇒ Object
341 342 343 |
# File 'lib/nested_set/base.rb', line 341 def quoted_parent_column_name connection.quote_column_name(parent_column_name) end |
#quoted_primary_key_column_name ⇒ Object
353 354 355 |
# File 'lib/nested_set/base.rb', line 353 def quoted_primary_key_column_name connection.quote_column_name(primary_key_column_name) end |
#quoted_right_column_name ⇒ Object
337 338 339 |
# File 'lib/nested_set/base.rb', line 337 def quoted_right_column_name connection.quote_column_name(right_column_name) end |
#quoted_scope_column_names ⇒ Object
345 346 347 |
# File 'lib/nested_set/base.rb', line 345 def quoted_scope_column_names scope_column_names.collect {|column_name| connection.quote_column_name(column_name) } end |
#right_column_name ⇒ Object
313 314 315 |
# File 'lib/nested_set/base.rb', line 313 def right_column_name [:right_column] end |
#scope_column_names ⇒ Object
321 322 323 |
# File 'lib/nested_set/base.rb', line 321 def scope_column_names Array([:scope]) end |