Reputation: 48460
Not sure what I'm doing wrong here, but here's a small excerpt from my HAML template:
- player = log.player
%tr#player-row-#{player.id}
This is giving me the following error:
Illegal element: classes and ids must have values.
Am I embedding it wrong?
Upvotes: 1
Views: 252
Reputation: 239302
As an alternative, you can use the slightly more succinct ()
form of attribute specification:
%tr(id="player-row-#{log.player.id}")
Upvotes: 1
Reputation: 40333
You can do it like this:
- player = log.player
%tr{:id => "player-row-#{player.id}"}
Upvotes: 3