]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3833 Remove dead ruby code
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 1 Oct 2012 13:05:20 +0000 (15:05 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 1 Oct 2012 15:32:32 +0000 (17:32 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb

index db30cd8f9c30c784906faebe7cfd1881ddb95321..e633cbc1ffe62fec1f92ff5fb52dfffa2e950209 100644 (file)
@@ -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()
index c3fbea89bed3eeb9959b8ad36bfe8e90494a8bc3..3d3e68506253675c28480968e5110069f0ec5c76 100644 (file)
@@ -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