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
This commit is contained in:
Toshi MARUYAMA
2019-10-09 07:39:28 +00:00
parent 7427a19ce5
commit 59dd9ec091
2 changed files with 8 additions and 9 deletions

View File

@@ -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