Small fixes for the invoice dir changes

This commit is contained in:
Paul van Tilburg 2011-12-10 16:58:38 +01:00
parent a32cb00846
commit 79e9190956
2 changed files with 4 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,7 +1,7 @@
.sass-cache
htpasswd
db/*
public/*.pdf
public/*.tex
public/invoices/*.pdf
public/invoices/*.tex
public/stylesheets/*.css
tmp/*

View File

@ -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