Rails developer/teacher, with a special interest in emberjs
Create a Liquid Handler for Rails 3.1
Back in the days with rails 2 you could easily create a handler for liquid and have access to the instance variables you’ve created in your controller.
However, the creators of liquid didn’t like this approach and so when Rails 3 came out the functionality didn’t get upgraded.
I needed this functionality today for a cms I’m working on so I took some time and headaches to figure this one out.
Fourth: Grab a beer, I just saved you 4 hours of puzzles and headaches :-)
Now you can create files like posts/index.html.liquid.
In our case, we have our views in the database so we can render different views for different websites.
The book Crafting Rails Applications has an extraordinary chapter that shows you how put views in your database, worth every penny.