diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-09 07:39:28 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-09 07:39:28 +0000 |
commit | 59dd9ec091279a210234ed7dbb7ab6dfdbc7b39c (patch) | |
tree | 40b10b31fdf5d1ddab5d16499ca4e2eb5adbc2c2 | |
parent | 7427a19ce5a9cb17cc63ac94fa917fe900929c25 (diff) | |
download | redmine-59dd9ec091279a210234ed7dbb7ab6dfdbc7b39c.tar.gz redmine-59dd9ec091279a210234ed7dbb7ab6dfdbc7b39c.zip |
code cleanup: rubocop: fix Layout/IndentationConsistency in app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18640 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | .rubocop_todo.yml | 1 | ||||
-rw-r--r-- | app/models/attachment.rb | 16 |
2 files changed, 8 insertions, 9 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bd6c71da2..22aab269f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -286,7 +286,6 @@ Layout/IndentHeredoc: # SupportedStyles: normal, indented_internal_methods Layout/IndentationConsistency: Exclude: - - 'app/models/attachment.rb' - 'test/helpers/application_helper_test.rb' - 'test/integration/api_test/custom_fields_attribute_test.rb' - 'test/mocks/open_id_authentication_mock.rb' diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 0b151dabb..e5adbb236 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -87,14 +87,14 @@ class Attachment < ActiveRecord::Base def file=(incoming_file) unless incoming_file.nil? @temp_file = incoming_file - if @temp_file.respond_to?(:original_filename) - self.filename = @temp_file.original_filename - self.filename.force_encoding("UTF-8") - end - if @temp_file.respond_to?(:content_type) - self.content_type = @temp_file.content_type.to_s.chomp - end - self.filesize = @temp_file.size + if @temp_file.respond_to?(:original_filename) + self.filename = @temp_file.original_filename + self.filename.force_encoding("UTF-8") + end + if @temp_file.respond_to?(:content_type) + self.content_type = @temp_file.content_type.to_s.chomp + end + self.filesize = @temp_file.size end end |