engines/adva_cms/vendor/plugins/simple_nested_set/lib/simple_nested_set.rb
def init_as_node
          max_right = nested_set.maximum(:rgt) || 0
          # adds the new node to the right of all existing nodes
          self.lft = max_right + 1
          self.rgt = max_right + 2
        end
# on creation set lft and rgt to the end of the tree
on creation set lft and rgt to the end of the tree
on creation set lft and rgt to the end of the tree
def init_as_node
          max_right = nested_set.maximum(:rgt) || 0
          self.lft = max_right + 1
          self.rgt = max_right + 2
        end
def init_as_node max_right = nested_set . maximum ( :rgt ) || 0 self . lft = max_right + 1 self . rgt = max_right + 2 end
on creation set lft and rgt to the end of the tree
on creation set lft and rgt to the end of the tree
# adds the new node to the right of all existing nodes