diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-11 18:27:51 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-11 18:29:02 +0100 |
commit | 7e39a6aecad4b3f0709a308a335d3565c490ab07 (patch) | |
tree | fb240d4fb6ac9b8b7499cbfce723d72f04f731c0 | |
parent | b4a59178aa76fc48c8fe76fd4dbc55996bc78eaa (diff) | |
download | sonarqube-7e39a6aecad4b3f0709a308a335d3565c490ab07.tar.gz sonarqube-7e39a6aecad4b3f0709a308a335d3565c490ab07.zip |
merge 2.5-RC2: inheritance of profiles - keep search engine context when reverting a rule to parent definition
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb | 2 |
2 files changed, 2 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 0d58ca0ac9d..e85524a7c75 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 @@ -85,7 +85,7 @@ class RulesConfigurationController < ApplicationController id = params[:id].to_i
rule_id = params[:active_rule_id].to_i
java_facade.revertRule(id, rule_id)
- redirect_to :action => 'index', :id => params[:id]
+ redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil})
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb index 52be4b10fcd..30520404489 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb @@ -57,7 +57,7 @@ <%= button_to "Edit rule", :action => 'edit', :id => profile.id, :rule_id => rule.id %> <% end %> <% if active_rule && active_rule.overrides? %> - <%= button_to "Revert to parent definition", :action => 'revert_rule', :id => profile.id, :active_rule_id => active_rule.id %><br/> + <%= button_to "Revert to parent definition", :overwrite_params => {:action => 'revert_rule', :id => profile.id, :active_rule_id => active_rule.id} %><br/> <% end %> <% end %> </div> |