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

ruby - liquid