Changes on nccu

This commit is contained in:
Matt committed 2012-05-18 15:20:45 +08:00
1 parent 2c16284f73
commit 6a022c90da
15 files changed
+89 -22

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
namespace :items do
task :tree_changes => :environment do
Item.all.each do |item|
item.position -= item.position > 5 ? 2 : 1
item.position -= 1
item.parent_ids = ancestors(item)
item.rename(:full_name, :path)
item.save