lib/liquid/file_system.rb in locomotive_liquid-2.2.3 vs lib/liquid/file_system.rb in locomotive_liquid-2.4.1
- old
+ new
@@ -12,11 +12,11 @@
# liquid = Liquid::Template.parse(template)
#
# 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(template_path)
+ def read_template_file(template_path, context)
raise FileSystemError, "This liquid context does not allow includes."
end
end
# This implements an abstract file system which retrieves template files named in a manner similar to Rails partials,
@@ -36,10 +36,10 @@
def initialize(root)
@root = root
end
- def read_template_file(template_path)
+ 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)
File.read(full_path)
end
\ No newline at end of file