summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-23 17:39:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-23 17:39:38 +0000
commit13f5301c097fab6b6865c739cfb4843cf7886c8a (patch)
tree9a69f25f91adf35c3ea94131e3046cea204a96da /lib/plugins
parentbe7895e04ec08afbb5f68e5f828ae729f0902bff (diff)
downloadredmine-13f5301c097fab6b6865c739cfb4843cf7886c8a.tar.gz
redmine-13f5301c097fab6b6865c739cfb4843cf7886c8a.zip
Fixed that Project.rebuild! sorts projects by id instead of name (#12431).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10866 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
index 073e13e29..95d9494d4 100644
--- a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
+++ b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
@@ -186,7 +186,7 @@ module CollectiveIdea #:nodoc:
end
# Find root node(s)
- root_nodes = where("#{quoted_parent_column_name} IS NULL").order("#{quoted_left_column_name}, #{quoted_right_column_name}, id").each do |root_node|
+ root_nodes = where("#{quoted_parent_column_name} IS NULL").order(acts_as_nested_set_options[:order]).each do |root_node|
# setup index for this scope
indices[scope.call(root_node)] ||= 0
set_left_and_rights.call(root_node)