Displaying 1 result from an estimated 1 matches for "lft_val".
Did you mean:
lat_val
2006 May 31
1
Help enhancing acts_as_nested_set
...ode already in the hierarchy, try move?" unless
node.unknown?
self.transaction {
begin
# get the next lft value to use for a new root node
last = self.find(:first, :order => "#{right_col_name}
DESC")
lft_val = last[right_col_name]
rescue ActiveRecord::RecordNotFound
lft_val = 0
end
node[left_col_name] = lft_val + 1
node[right_col_name] = lft_val + 2
node[parent_column] = 0
# What do to...