Index: awesome_nested_set.rb =================================================================== --- awesome_nested_set.rb (revision 2641) +++ awesome_nested_set.rb (working copy) @@ -383,22 +383,22 @@ # Move the node to the left of another node (you can pass id only) def move_to_left_of(node) - move_to node, :left + move_to_sub node, :left end # Move the node to the left of another node (you can pass id only) def move_to_right_of(node) - move_to node, :right + move_to_sub node, :right end # Move the node to the child of another node (you can pass id only) def move_to_child_of(node) - move_to node, :child + move_to_sub node, :child end # Move the node to root nodes def move_to_root - move_to nil, :root + move_to_sub nil, :root end def move_possible?(target) @@ -472,7 +472,7 @@ "#{quoted_right_column_name}, #{quoted_parent_column_name}") end - def move_to(target, position) + def move_to_sub(target, position) raise ActiveRecord::ActiveRecordError, "You cannot move a new node" if self.new_record? return if callback(:before_move) == false transaction do