]> source.dussan.org Git - sonarqube.git/commitdiff
Case-insensitive sort of manual rules in administration console
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 27 Mar 2012 13:01:44 +0000 (15:01 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 27 Mar 2012 13:02:57 +0000 (15:02 +0200)
sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb

index e1a75229ee2e765d65567ed37ee24678f6743127..c64a12f17bf529ffde0df70ef6bc69bc2d302e0c 100644 (file)
@@ -128,7 +128,8 @@ class Rule < ActiveRecord::Base
   end
 
   def self.manual_rules
-    Rule.find(:all, :conditions => ['enabled=? and plugin_name=?', true, MANUAL_REPOSITORY_KEY], :order => 'name')
+    rules = Rule.find(:all, :conditions => ['enabled=? and plugin_name=?', true, MANUAL_REPOSITORY_KEY])
+    Api::Utils.insensitive_sort(rules) {|rule| rule.name}
   end
 
   def self.manual_rule(id)