]> source.dussan.org Git - redmine.git/commitdiff
use "do end" instead of {} at NewsController
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 8 Nov 2020 13:02:19 +0000 (13:02 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 8 Nov 2020 13:02:19 +0000 (13:02 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20301 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/news_controller.rb

index ac0e6a97e413f05dfe79e626d4318434b9413a1a..1f5b83eb4d509cb307d6a426e43b34d282e528d1 100644 (file)
@@ -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