mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
Removed context from read_template_file, fixed tests to match new arity
This commit is contained in:
@@ -78,15 +78,7 @@ module Liquid
|
||||
def read_template_from_file_system(context)
|
||||
file_system = context.registers[:file_system] || Liquid::Template.file_system
|
||||
|
||||
# make read_template_file call backwards-compatible.
|
||||
case file_system.method(:read_template_file).arity
|
||||
when 1
|
||||
file_system.read_template_file(context[@template_name])
|
||||
when 2
|
||||
file_system.read_template_file(context[@template_name], context)
|
||||
else
|
||||
raise ArgumentError, "file_system.read_template_file expects two parameters: (template_name, context)"
|
||||
end
|
||||
file_system.read_template_file(context[@template_name])
|
||||
end
|
||||
|
||||
def pass_options
|
||||
|
||||
Reference in New Issue
Block a user