diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-27 01:08:54 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-27 01:08:54 +0000 |
commit | ca3d706f56b90958e3b451e7fda04eee52ca2c1e (patch) | |
tree | 54fbf258f0b58291bbbd69447cb2fef51ca90197 /app/models/issue_priority.rb | |
parent | 077598fe4bb700b53e1773ff8d60b5698349b8c0 (diff) | |
download | redmine-ca3d706f56b90958e3b451e7fda04eee52ca2c1e.tar.gz redmine-ca3d706f56b90958e3b451e7fda04eee52ca2c1e.zip |
remove unneeded Relation#all from IssuePriority model
git-svn-id: http://svn.redmine.org/redmine/trunk@12722 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_priority.rb')
-rw-r--r-- | app/models/issue_priority.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_priority.rb b/app/models/issue_priority.rb index d07baa6b6..95b120d7a 100644 --- a/app/models/issue_priority.rb +++ b/app/models/issue_priority.rb @@ -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| |