collectiveidea/awesome_nested_set — pull request #176 by yuszuv (2013-02-17 18:49:21+00:00)
Title: remove some wordy lines of code and changed #move_to_root implementation

Hi,

I did a slight refactoring on the code.

* the `where` clause added in 5395e63451610316669cdf803c9cb526f8464a7b should be now more readable
* `node.move_to_root` is now implemented as `node.move_to_right_of(node.root)`, because in the current implementation node.lft is set to 1, which can cause a performance issue (namely: it updates all records!) if you have many roots and you want to move one subtree of the last root to root level
* all `move_to` variants are able to take record objects too, so the comments, that the can't are removed.

I hope that helps.

Best regards

Jan