From: Simon Brandhof Date: Mon, 1 Oct 2012 13:05:20 +0000 (+0200) Subject: SONAR-3833 Remove dead ruby code X-Git-Tag: 3.3~153 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=849d1ea4e5e76e98e745765f45bf4730254d64e7;p=sonarqube.git SONAR-3833 Remove dead ruby code --- 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 db30cd8f9c3..e633cbc1ffe 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 @@ -36,19 +36,15 @@ class RulesConfigurationController < ApplicationController before_filter :admin_required, :except => ['index', 'export'] def index - unless params[:id].blank? - if params[:id].to_i<=0 - redirect_to :controller => 'profiles' - return - end - begin - @profile = Profile.find(params[:id].to_i) - rescue - redirect_to :controller => 'profiles' - return - end - else - @profile = Profile.default_profile + if params[:id].to_i<=0 + redirect_to :controller => 'profiles' + return + end + begin + @profile = Profile.find(params[:id].to_i) + rescue + redirect_to :controller => 'profiles' + return end init_params() diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb index c3fbea89bed..3d3e6850625 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb @@ -30,12 +30,6 @@ class RulesController < ApplicationController @rule=Rule.find(key) end @page_title=@rule.name - - if params[:resource_id] - resource = Project.find(params[:resource_id]) - @profile = resource.root_project.profile || Profile.default_profile - @active_rule = @profile.active_by_rule_id(@rule.id) - end end end