-@things.each do |thing|
%div.thing
= thing
I've seen a few different techniques. But with the above HAML template, I want each thing
to have a unique id from 1 to n+1 things. What's the best way to dynamically increment the id for all individual things
?
Ex: For n things, I'd like the HTML to look like this.
<div class='thing' id='1'>
<div class='thing' id='2'>
...
<div class='thing' id=n+1>