@@ -48,7 +48,7 class IssuePriority < Enumeration | |||
|
48 | 48 | # Updates position_name for active priorities |
|
49 | 49 | # Called from migration 20121026003537_populate_enumerations_position_name |
|
50 | 50 | def self.compute_position_names |
|
51 |
priorities = where(:active => true). |
|
|
51 | priorities = where(:active => true).sort_by(&:position) | |
|
52 | 52 | if priorities.any? |
|
53 | 53 | default = priorities.detect(&:is_default?) || priorities[(priorities.size - 1) / 2] |
|
54 | 54 | priorities.each_with_index do |priority, index| |
General Comments 0
You need to be logged in to leave comments.
Login now