From 97d1bafb93a73183cd64ea99ea5ad97850d67cac Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 11:53:59 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/BlockEndNewline in app/controllers/files_controller.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19010 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - app/controllers/files_controller.rb | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 95802d9aa..11c6ad0d1 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -24,7 +24,6 @@ Layout/BlockAlignment: # Cop supports --auto-correct. Layout/BlockEndNewline: Exclude: - - 'app/controllers/files_controller.rb' - 'app/models/message.rb' # Cop supports --auto-correct. diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 5700cd81c..00b0dca15 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -62,7 +62,8 @@ class FilesController < ApplicationController respond_to do |format| format.html { flash[:notice] = l(:label_file_added) - redirect_to project_files_path(@project) } + redirect_to project_files_path(@project) + } format.api { render_api_ok } end else @@ -70,7 +71,8 @@ class FilesController < ApplicationController format.html { flash.now[:error] = l(:label_attachment) + " " + l('activerecord.errors.messages.invalid') new - render :action => 'new' } + render :action => 'new' + } format.api { render :status => :bad_request } end end -- 2.39.5