diff options
Diffstat (limited to 'lib/awesome_patch.rb')
| -rw-r--r-- | lib/awesome_patch.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/awesome_patch.rb b/lib/awesome_patch.rb new file mode 100644 index 0000000..1694ccf --- /dev/null +++ b/lib/awesome_patch.rb | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | module CollectiveIdea | ||
| 2 | module Acts #:nodoc: | ||
| 3 | module NestedSet | ||
| 4 | module InstanceMethods | ||
| 5 | alias_method :move_to_original, :move_to | ||
| 6 | |||
| 7 | def move_to target, position | ||
| 8 | move_to_original target, position | ||
| 9 | if self.class == Node | ||
| 10 | self.update_unique_name | ||
| 11 | self.save | ||
| 12 | end | ||
| 13 | end | ||
| 14 | end | ||
| 15 | end | ||
| 16 | end | ||
| 17 | end \ No newline at end of file | ||
