@@ -421,6 +421,7 class Project < ActiveRecord::Base | |||
|
421 | 421 | transaction do |
|
422 | 422 | update_all "lft = NULL, rgt = NULL" |
|
423 | 423 | rebuild!(false) |
|
424 | all.each { |p| p.set_or_update_position_under(p.parent) } | |
|
424 | 425 | end |
|
425 | 426 | end |
|
426 | 427 | |
@@ -1017,6 +1018,8 class Project < ActiveRecord::Base | |||
|
1017 | 1018 | set_or_update_position_under(parent) |
|
1018 | 1019 | end |
|
1019 | 1020 | |
|
1021 | public | |
|
1022 | ||
|
1020 | 1023 | # Inserts/moves the project so that target's children or root projects stay alphabetically sorted |
|
1021 | 1024 | def set_or_update_position_under(target_parent) |
|
1022 | 1025 | parent_was = parent |
General Comments 0
You need to be logged in to leave comments.
Login now