Haml - how to put ruby variable into the name of class identifier

Viewed 7062

This is a line, which I use for formatting my links:

%a.accordion-toggle.toggle-6{:href => "#"} #{name}

I would need to have an option to put in this class toggle-6 my own digit, for example toggle-1 etc.

How to do that in HAML syntax? I've tried something like

%a.accordion-toggle.toggle-#{id}{:href => "#collapseOne"} #{name}

But this returns

Illegal element: classes and ids must have values.
1 Answers
Related