Carson Reinke's Headshot

Carson Reinke's Blog 🚗☀☔🔑

Liquid::Drop method with arguments

Kind of a hack, but possible using a new stack and a variable named “args” from a filter method:

@context.stack({'args' =\> args}) do #Call to drop method end

Related:
https://github.com/Shopify/liquid/blob/v2.5.4/lib/liquid/context.rb#L103
https://github.com/Shopify/liquid/issues/29
https://groups.google.com/forum/#!topic/liquid-templates/adH2bjH0yAE

howto