Commit 1bcfc143 by Jon Yurek

Prevent error coercing nil -> Integer by explicit conversion.

parent a3f7b1bf
......@@ -43,7 +43,7 @@ module Paperclip
# Replaces Tempfile's +make_tmpname+ with one that honors file extensions.
def make_tmpname(basename, n)
extension = File.extname(basename)
sprintf("%s,%d,%d%s", File.basename(basename, extension), $$, n, extension)
sprintf("%s,%d,%d%s", File.basename(basename, extension), $$, n.to_i, extension)
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment