Merge branch 'master' of github.com:joost/liquid into joost-master

This commit is contained in:
Florian Weingarten
2013-11-25 10:51:48 -05:00
+3 -2
View File
@@ -51,13 +51,14 @@ module Liquid
context[key] = context[value] context[key] = context[value]
end 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) if variable.is_a?(Array)
variable.collect do |var| variable.collect do |var|
context[@template_name[1..-2]] = var context[context_variable_name] = var
partial.render(context) partial.render(context)
end end
else else
context[@template_name[1..-2]] = variable context[context_variable_name] = variable
partial.render(context) partial.render(context)
end end
end end