Module: Mongoid::Acts::NestedSet::Fields

Included in:
Document::ClassMethods, Document::InstanceMethods
Defined in:
lib/mongoid_nested_set/fields.rb

Overview

Mixed int both classes and instances to provide easy access to the field names

Instance Method Summary collapse

Instance Method Details

#left_field_nameObject



6
7
8
# File 'lib/mongoid_nested_set/fields.rb', line 6

def left_field_name
  acts_as_nested_set_options[:left_field]
end

#outline_number_field_nameObject



21
22
23
# File 'lib/mongoid_nested_set/fields.rb', line 21

def outline_number_field_name
  acts_as_nested_set_options[:outline_number_field]
end

#parent_field_nameObject



16
17
18
# File 'lib/mongoid_nested_set/fields.rb', line 16

def parent_field_name
  acts_as_nested_set_options[:parent_field]
end

#quoted_left_field_nameObject



36
37
38
39
# File 'lib/mongoid_nested_set/fields.rb', line 36

def quoted_left_field_name
  # TODO
  left_field_name
end

#quoted_parent_field_nameObject



48
49
50
51
# File 'lib/mongoid_nested_set/fields.rb', line 48

def quoted_parent_field_name
  # TODO
  parent_field_name
end

#quoted_right_field_nameObject



42
43
44
45
# File 'lib/mongoid_nested_set/fields.rb', line 42

def quoted_right_field_name
  # TODO
  right_field_name
end

#quoted_scope_field_namesObject



54
55
56
57
# File 'lib/mongoid_nested_set/fields.rb', line 54

def quoted_scope_field_names
  # TODO
  scope_field_names
end

#right_field_nameObject



11
12
13
# File 'lib/mongoid_nested_set/fields.rb', line 11

def right_field_name
  acts_as_nested_set_options[:right_field]
end

#scope_classObject



31
32
33
# File 'lib/mongoid_nested_set/fields.rb', line 31

def scope_class
  acts_as_nested_set_options[:klass]
end

#scope_field_namesObject



26
27
28
# File 'lib/mongoid_nested_set/fields.rb', line 26

def scope_field_names
  Array(acts_as_nested_set_options[:scope])
end