Fix commit 7bbb4ff84f so it's backwards-compatible

This commit is contained in:
Steven Soroka
2011-04-28 15:18:51 -05:00
parent 59a63e0fe5
commit 74cdfc6718
4 changed files with 35 additions and 13 deletions
+2 -3
View File
@@ -14,7 +14,7 @@ module Liquid
# This will parse the template with a LocalFileSystem implementation rooted at 'template_path'.
class BlankFileSystem
# Called by Liquid to retrieve a template file
def read_template_file(context, template_name)
def read_template_file(template_path, context)
raise FileSystemError, "This liquid context does not allow includes."
end
end
@@ -38,8 +38,7 @@ module Liquid
@root = root
end
def read_template_file(context, template_name)
template_path = context[template_name]
def read_template_file(template_path, context)
full_path = full_path(template_path)
raise FileSystemError, "No such template '#{template_path}'" unless File.exists?(full_path)