mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Merge branch 'master' of github.com:joost/liquid into joost-master
This commit is contained in:
@@ -51,13 +51,14 @@ module Liquid
|
||||
context[key] = context[value]
|
||||
end
|
||||
|
||||
context_variable_name = @template_name[1..-2].split('/').last # for a snippet in a subdir only use the filename
|
||||
if variable.is_a?(Array)
|
||||
variable.collect do |var|
|
||||
context[@template_name[1..-2]] = var
|
||||
context[context_variable_name] = var
|
||||
partial.render(context)
|
||||
end
|
||||
else
|
||||
context[@template_name[1..-2]] = variable
|
||||
context[context_variable_name] = variable
|
||||
partial.render(context)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user