From fb6b565a1ec968a0f7f9f261ec1d6a328d891209 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 18 Apr 2016 17:51:10 +0000 Subject: Forum list can be reordered with drag and drop (#12909). git-svn-id: http://svn.redmine.org/redmine/trunk@15337 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/boards_controller.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app/controllers/boards_controller.rb') diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index d56847131..9ab80f4f9 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -87,9 +87,18 @@ class BoardsController < ApplicationController def update @board.safe_attributes = params[:board] if @board.save - redirect_to_settings_in_projects + respond_to do |format| + format.html { + flash[:notice] = l(:notice_successful_update) + redirect_to_settings_in_projects + } + format.js { render :nothing => true } + end else - render :action => 'edit' + respond_to do |format| + format.html { render :action => 'edit' } + format.js { render :nothing => true, :status => 422 } + end end end -- cgit v1.2.3