about summary refs log tree commit diff
path: root/lib/paperclip
diff options
context:
space:
mode:
Diffstat (limited to 'lib/paperclip')
-rw-r--r--lib/paperclip/gif_transcoder.rb2
-rw-r--r--lib/paperclip/type_corrector.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/paperclip/gif_transcoder.rb b/lib/paperclip/gif_transcoder.rb
index f385b00a3..32bdb8a86 100644
--- a/lib/paperclip/gif_transcoder.rb
+++ b/lib/paperclip/gif_transcoder.rb
@@ -109,7 +109,7 @@ module Paperclip
       final_file = Paperclip::Transcoder.make(file, options, attachment)
 
       if options[:style] == :original
-        attachment.instance.file_file_name    = File.basename(attachment.instance.file_file_name, '.*') + '.mp4'
+        attachment.instance.file_file_name    = "#{File.basename(attachment.instance.file_file_name, '.*')}.mp4"
         attachment.instance.file_content_type = 'video/mp4'
         attachment.instance.type              = MediaAttachment.types[:gifv]
       end
diff --git a/lib/paperclip/type_corrector.rb b/lib/paperclip/type_corrector.rb
index 17e2fc5da..030b98b12 100644
--- a/lib/paperclip/type_corrector.rb
+++ b/lib/paperclip/type_corrector.rb
@@ -7,7 +7,7 @@ module Paperclip
     def make
       return @file unless options[:format]
 
-      target_extension = '.' + options[:format]
+      target_extension = ".#{options[:format]}"
       extension        = File.extname(attachment.instance_read(:file_name))
 
       return @file unless options[:style] == :original && target_extension && extension != target_extension