Fix bugs for shift_to and change items.rake for the missing position in db
This commit is contained in:
1 parent
6a443f0976
commit
17b486f9e9
3 files changed
+20
-1
No files matched your search
@@ -3,7 +3,7 @@
|
||||
namespace :items do
|
||||
task :tree_changes => :environment do
|
||||
Item.all.each do |item|
|
||||
item.position -= 1
|
||||
item.position -= item.position > 5 ? 2 : 1
|
||||
item.parent_ids = ancestors(item)
|
||||
item.rename(:full_name, :path)
|
||||
item.save
|
||||
|
||||
Reference in new issue
Block a user