From 79e9190956bf544d9f47a3b05eb10112d3085ef3 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 10 Dec 2011 16:58:38 +0100 Subject: [PATCH] Small fixes for the invoice dir changes --- .gitignore | 4 ++-- stoptime.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bcbd3cc..0a0f9bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .sass-cache htpasswd db/* -public/*.pdf -public/*.tex +public/invoices/*.pdf +public/invoices/*.tex public/stylesheets/*.css tmp/* diff --git a/stoptime.rb b/stoptime.rb index 03c2266..f9c5749 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -850,11 +850,11 @@ module StopTime::Controllers elsif @format == "tex" tex_file = PUBLIC_DIR + "invoices/#{@number}.tex" _generate_invoice_tex(@number) unless tex_file.exist? - redirect(Static, tex_file.basename) + redirect R(Static, "") + "invoices/#{tex_file.basename}" elsif @format == "pdf" pdf_file = PUBLIC_DIR + "invoices/#{@number}.pdf" _generate_invoice_pdf(@number) unless pdf_file.exist? - redirect(Static, pdf_file.basename) + redirect R(Static, "") + "invoices/#{pdf_file.basename}" end end