This is how my application layout page is looking (here is a part of it)
%html
%body
#main
.content
= yield
Sometimes (not always) I need to add “id” attribute to .content div. How can I do it from a html.haml page?
Note: I don’t mean to do it in runtime using javascript.
UPDATE: thanks, but I forgot to mention that this “id” is different for each page. In other words, each html.haml page might have its own “id” for .content.
And another solution:
If you don’t define
@content_idthen.contentwould be without id.