Skip to content

Commit

Permalink
documentation: combining object reference and class attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbeck authored and norman committed Nov 5, 2013
1 parent da1b6c4 commit ee00d3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee00d3b

Please sign in to comment.