From: Toshi MARUYAMA Date: Mon, 9 Nov 2020 13:24:21 +0000 (+0000) Subject: use "do end" instead of {} at FilesController X-Git-Tag: 4.2.0~507 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d0bc930d577a9212279420e55fdd1de5c2dbfefc;p=redmine.git use "do end" instead of {} at FilesController git-svn-id: http://svn.redmine.org/redmine/trunk@20311 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 1301b6135..fe81f10c3 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -60,19 +60,19 @@ class FilesController < ApplicationController Mailer.deliver_attachments_added(attachments[:files]) end respond_to do |format| - format.html { + format.html do flash[:notice] = l(:label_file_added) redirect_to project_files_path(@project) - } + end format.api { render_api_ok } end else respond_to do |format| - format.html { + format.html do flash.now[:error] = l(:label_attachment) + " " + l('activerecord.errors.messages.invalid') new render :action => 'new' - } + end format.api { render :status => :bad_request } end end