From c974f4422a7aa1c2ccb74ea30abd87f6595f3812 Mon Sep 17 00:00:00 2001 From: Alexander Danilenko Date: Wed, 6 Jun 2012 15:58:59 +0400 Subject: [PATCH] Fix temp file name --- lib/wisepdf/render.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wisepdf/render.rb b/lib/wisepdf/render.rb index e476572..4ba0eca 100644 --- a/lib/wisepdf/render.rb +++ b/lib/wisepdf/render.rb @@ -71,7 +71,7 @@ def prerender_header_and_footer(arguments) opts = arguments[hf].delete(:html) @hf_tempfiles = [] if ! defined?(@hf_tempfiles) - @hf_tempfiles.push( tf = Tempfile.new("wisepdf_#{hf}_pdf", '.html') ) + @hf_tempfiles.push( tf = Tempfile.new(["wisepdf_#{hf}_pdf", '.html'], 'tmp') ) opts[:layout] ||= arguments[:layout] tf.write render_to_string(:template => opts[:template], :layout => opts[:layout], :locals => opts[:locals])