Permalink
Browse files

Prevent error coercing nil -> Integer by explicit conversion.

  • Loading branch information...
1 parent a3f7b1b commit 1bcfc14388d0651c5fc70ab9ca3511144c698903 @jyurek jyurek committed Jun 8, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/paperclip/processor.rb
@@ -43,7 +43,7 @@ class Tempfile < ::Tempfile
# 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

1 comment on commit 1bcfc14

@cheeby
cheeby commented on 1bcfc14 Mar 15, 2012

yay! this was giving me one hell of a time on heroku. thanks!

Please sign in to comment.