aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorDavid Festal <david.festal@serli.com>2011-06-16 16:55:55 +0200
committerDavid Festal <david.festal@serli.com>2011-07-04 22:52:57 +0200
commitd3320a0b04434e45cd85a672bddc86f9d7837bd3 (patch)
tree8413abc92298bd873bfc851e648997d860a52317 /sonar-server
parentbb1263d99478b6ee598bf636d241e88cc40c11b6 (diff)
downloadsonarqube-d3320a0b04434e45cd85a672bddc86f9d7837bd3.tar.gz
sonarqube-d3320a0b04434e45cd85a672bddc86f9d7837bd3.zip
Code cleanup
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb
index a4a41361e9e..75077f60ff9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb
@@ -43,9 +43,7 @@ class MetricsController < ApplicationController
metric = Metric.new
end
- logger.error(params[:metric].to_s)
metric.attributes=params[:metric]
- logger.error(metric.attributes.to_s)
if metric.short_name(false)
metric.name = metric.short_name(false).downcase.gsub(/\s/, '_')[0..59]
end
@@ -56,11 +54,9 @@ class MetricsController < ApplicationController
metric.user_managed = true
metric.enabled = true
metric.origin = Metric::ORIGIN_GUI
- logger.error(metric.attributes.to_s)
begin
new_rec = metric.new_record?
- logger.error(new_rec.to_s)
metric.save!
Metric.clear_cache
if new_rec
@@ -68,9 +64,7 @@ class MetricsController < ApplicationController
else
flash[:notice] = 'Successfully updated.'
end
- rescue => e
- logger.error(e.message)
- logger.error(e.backtrace)
+ rescue
flash[:error] = metric.errors.full_messages.join("<br/>\n")
end
redirect_to :action => 'index', :domain => metric.domain(false)