On Mon, Dec 20, 2010 at 5:28 PM, Nathan Weizenbaum <[email protected]> wrote:
> You can use any Ruby constructs in Haml.
>
> - for i in 0..10
> %img{:src => ("Truth%03d.jpg#full" % i)}/
Huh, I didn't realize you could use the % operator like that in Ruby.
I'd have done:
- ("000".."010").each do |i|
%img{:src => "Truth#{i}.jpg#full"}/
-n
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.