summaryrefslogtreecommitdiffstats
path: root/app/controllers/boards_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/boards_controller.rb')
-rw-r--r--app/controllers/boards_controller.rb13
1 files changed, 11 insertions, 2 deletions
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