infbio/haml_assets — Issue #6: Can I use haml for render variables?
Author: mbavio
Created: 2011-12-19 18:57:03+00:00
State: open

So I'm using this gem to do haml backbone templates.

What I'm not being able to do is to print variables in the haml engine.

Suppose I have a dog_type variable being set by the view call to the template.

In my template, if I do this:

<%= dog_type %>

which is using ejs engine to print the variable, it works like charm. But if I put:

= dog_type

it generates a haml error, like if the variable wouldnt exist.

Can I actually do the thing that I'm requesting? I really like the idea of using rails helpers on my templates, so I love the idea of using haml assets!