Reputation: 1341
I want to reproduce the haml code below by using the haml_tag
method.
= %img { alt:'Hi' , src: 'hi.jpg' }
Can anyone help?
Upvotes: 1
Views: 747
Reputation: 1341
Nah.. I've just realized that. There it goes:
- haml_tag :img, { alt:'Hi' , src: 'hi.jpg' }
Attention to the details of -
instead of =
. haml_tag
method report directly to the haml model.
Easier than I thought. :)
Upvotes: 1