From: David Gageot Date: Fri, 29 Jun 2012 14:26:46 +0000 (+0200) Subject: SONAR-3512 Follow newly created dashboard X-Git-Tag: 3.2~280 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=87585967c3eef34999607a6aa3c9fb157e9ff535;p=sonarqube.git SONAR-3512 Follow newly created dashboard --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index b07c19fc1c5..e9a999ab673 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -59,6 +59,7 @@ class DashboardsController < ApplicationController elsif @dashboard.save add_default_dashboards_if_first_user_dashboard(@dashboard.global?) last_index=current_user.active_dashboards.max_by(&:order_index).order_index + current_user.active_dashboards.create(:dashboard => @dashboard, :user => current_user, :order_index => (last_index+1)) redirect_to :action => 'index', :resource => params[:resource], :highlight => @dashboard.id else