Pathname Objects
Web#files_path and Web#blatex_pngs_path now return Pathname objects.
Based on JHerdman's
5d1e8f420b
but requires several other changes to the code (which assumed a string).
Also, test for itex2MML 1.3.10 (you should update that too).
This commit is contained in:
parent
c05d69bcff
commit
336e57d6b4
4 changed files with 17 additions and 13 deletions
|
@ -26,7 +26,7 @@ class FileController < ApplicationController
|
|||
end
|
||||
else
|
||||
# no form supplied, this is a request to download the file
|
||||
file = @web.files_path + '/' + @file_name
|
||||
file = @web.files_path.join(@file_name)
|
||||
if File.exists?(file)
|
||||
send_file(file)
|
||||
else
|
||||
|
@ -38,7 +38,7 @@ class FileController < ApplicationController
|
|||
end
|
||||
|
||||
def blahtex_png
|
||||
send_file(@web.blahtex_pngs_path + '/' + params['id'])
|
||||
send_file(@web.blahtex_pngs_path.join(params['id']))
|
||||
end
|
||||
|
||||
def delete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue