ruby on rails - Haml: How to add classes dynamically to an element? -


I have a & lt; Tr & gt; Element is in my thoughts, and I want to add classes dynamically

the result should be seen

    

Where pck1 , pck3 and pck5 There are packaging related to a company.

Or simply:

 % Tr {: class = & gt; class}  

Comments