1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

documentation: combining object reference and class attribute

This commit is contained in:
Jared Beck 2013-06-30 22:44:24 -04:00 committed by Norman Clarke
parent da1b6c4a01
commit ee00d3be36

View file

@ -622,6 +622,13 @@ is compiled to:
Hello!
</div>
The `:class` attribute may be used in conjunction with an object
reference. The compiled element will have the union of all classes.
- user = User.find(1)
%p[user]{:class => 'alpha bravo'}
<p id="user_1" class="alpha bravo user"></p>
## Doctype: `!!!`
When describing HTML documents with Haml, you can have a document type or XML