]> source.dussan.org Git - sonarqube.git/commitdiff
Fix regression introduced in 672f34433e52f15d851dff4978878887e69c2969
authorDavid Gageot <david@gageot.net>
Tue, 24 Jul 2012 04:56:58 +0000 (06:56 +0200)
committerDavid Gageot <david@gageot.net>
Tue, 24 Jul 2012 04:56:58 +0000 (06:56 +0200)
sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb

index 93957d00f079290a11b3b2649b177a4b437e869a..0979374d4452915eef4582e1876f01b7c060b9fc 100644 (file)
@@ -33,16 +33,12 @@ class RulesParameter < ActiveRecord::Base
     param_type[2, param_type.length-3].split(",")
   end
 
-  def description
-    description(rule)
-  end
-
-  # We provide the rule as parameter to avoid reloading this rule_parameter's rule.
+  # We can provide the rule as parameter to avoid reloading this rule_parameter's rule.
   # This hack would be useless if we could use :inverse_of on :rule
-  def description(rule)
+  def description(param_rule = rule)
     @l10n_description ||=
       begin
-        result = Java::OrgSonarServerUi::JRubyFacade.getInstance().getRuleParamDescription(I18n.locale, rule.repository_key, rule.plugin_rule_key, name())
+        result = Java::OrgSonarServerUi::JRubyFacade.getInstance().getRuleParamDescription(I18n.locale, param_rule.repository_key, param_rule.plugin_rule_key, name())
         result = read_attribute(:description) unless result
         result
       end