diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-08 13:02:19 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-08 13:02:19 +0000 |
commit | 3ec47cc85ac09c4d347ec12513ba238533eb35e7 (patch) | |
tree | 2be6414a64d807c9ba64c9bf97a2fa275c11a93d | |
parent | 34567be040979fd5759b3db63979bd99879b3592 (diff) | |
download | redmine-3ec47cc85ac09c4d347ec12513ba238533eb35e7.tar.gz redmine-3ec47cc85ac09c4d347ec12513ba238533eb35e7.zip |
use "do end" instead of {} at NewsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20301 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/news_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index ac0e6a97e..1f5b83eb4 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -81,11 +81,11 @@ class NewsController < ApplicationController @news.save_attachments(params[:attachments] || (params[:news] && params[:news][:uploads])) if @news.save respond_to do |format| - format.html { + format.html do render_attachment_warning_if_needed(@news) flash[:notice] = l(:notice_successful_create) redirect_to project_news_index_path(@project) - } + end format.api { render_api_ok } end else @@ -104,11 +104,11 @@ class NewsController < ApplicationController @news.save_attachments(params[:attachments] || (params[:news] && params[:news][:uploads])) if @news.save respond_to do |format| - format.html { + format.html do render_attachment_warning_if_needed(@news) flash[:notice] = l(:notice_successful_update) redirect_to news_path(@news) - } + end format.api { render_api_ok } end else @@ -122,10 +122,10 @@ class NewsController < ApplicationController def destroy @news.destroy respond_to do |format| - format.html { + format.html do flash[:notice] = l(:notice_successful_delete) redirect_to project_news_index_path(@project) - } + end format.api { render_api_ok } end end |