]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from IssuePriority model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 27 Jan 2014 01:08:54 +0000 (01:08 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 27 Jan 2014 01:08:54 +0000 (01:08 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12722 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_priority.rb

index d07baa6b6303af88922c0fe0accf0de15c0dad9a..95b120d7a23bf086eef581e564e5dc21beeb9e60 100644 (file)
@@ -48,7 +48,7 @@ class IssuePriority < Enumeration
   # Updates position_name for active priorities
   # Called from migration 20121026003537_populate_enumerations_position_name
   def self.compute_position_names
-    priorities = where(:active => true).all.sort_by(&:position)
+    priorities = where(:active => true).sort_by(&:position)
     if priorities.any?
       default = priorities.detect(&:is_default?) || priorities[(priorities.size - 1) / 2]
       priorities.each_with_index do |priority, index|