Particles in a liquid

We are trying to rewrite our current views from ERb to Liquid, and we had the following problem: we have a lot in our code render(:partial => '/path/to/partial'), but we did not find absolutely no instructions on how to process partial parts in Liquid. The only solution we found was with help render_to_string, but it is too ugly to be true.

+3
source share
1 answer

Liquid way should use the tag include: http://liquid.rubyforge.org/classes/Liquid/Include.html

(I know the documentation is not very useful. Here's a post showing an example usage: http://forums.shopify.com/categories/2/posts/1629 )

+2
source

Source: https://habr.com/ru/post/1708176/


All Articles