]> source.dussan.org Git - redmine.git/commitdiff
Prevents position to be specified more than once in the order by list which is not...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 3 Jan 2013 11:37:07 +0000 (11:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 3 Jan 2013 11:37:07 +0000 (11:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11100 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/enumeration.rb

index 1c4a7a4141b4afb694491aae7c28773b4a5690d1..fde7ea79b82f03439d0a5de391ac0bda765245bf 100644 (file)
@@ -24,7 +24,7 @@ class Enumeration < ActiveRecord::Base
 
   acts_as_list :scope => 'type = \'#{type}\''
   acts_as_customizable
-  acts_as_tree :order => 'position ASC'
+  acts_as_tree :order => "#{Enumeration.table_name}.position ASC"
 
   before_destroy :check_integrity
   before_save    :check_default