aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-08-13 10:15:20 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-08-13 10:15:20 +0200
commit09e31c6fb9d76c6ae24f0defce674205f1e7412f (patch)
treee928d919d41c9f30faea54138b86ad8dbb83ad68 /sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
parent71ba082eb96d16a2d96cb6e57bd1a93263da09c5 (diff)
downloadsonarqube-09e31c6fb9d76c6ae24f0defce674205f1e7412f.tar.gz
sonarqube-09e31c6fb9d76c6ae24f0defce674205f1e7412f.zip
SONAR-4568 On a boolean rule parameter, this is not possible to set back the parameter value to 'Default'
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
index 1450440a5b2..b0b9dab8659 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
@@ -307,7 +307,7 @@ class RulesConfigurationController < ApplicationController
def update_param
verify_post_request
access_denied unless has_role?(:profileadmin)
- require_parameters :profile_id, :param_id, :active_rule_id, :value
+ require_parameters :profile_id, :param_id, :active_rule_id
profile = Profile.find(params[:profile_id].to_i)
rule_param = RulesParameter.find(params[:param_id].to_i)
active_rule = ActiveRule.find(params[:active_rule_id].to_i)
@@ -327,7 +327,8 @@ class RulesConfigurationController < ApplicationController
active_param = nil
java_facade.ruleParamChanged(profile.id, active_rule.id, rule_param.name, old_value, nil, current_user.name)
end
- # let's reload the active rule
+
+ # let's reload the active rule
active_rule = ActiveRule.find(active_rule.id)
render :partial => 'rule', :locals => {:profile => profile, :rule => active_rule.rule, :active_rule => active_rule}
end