search for: right_bound

Displaying 1 result from an estimated 1 matches for "right_bound".

2006 May 31
1
Help enhancing acts_as_nested_set
...s unknown self.class.add_root self end if child.unknown? # OK, add as the last child into self # we need to add and shift everything else to the right self.class.transaction { child[parent_column] = self.id right_bound = self[right_col_name] child[left_col_name] = right_bound child[right_col_name] = right_bound + 1 self[right_col_name] += 2 self.class.update_all( "#{left_col_name} = (#{left_col_name} + 2)", "#{left_col_name} >= #{right_bou...