[haml] Simple For Loop to Create Div Class Attributes

2010-03-04 Thread Michael Narciso
Hello all, Just had a brief conversation with Chris Eppstein as he demonstrated how I can loop through to get my desired result. It went something like this: Desired Result: Code: - (1..3).each do |i| %div{:class => "item-#{i}"} However, I was thinking... why doesn't the following code w

Re: [haml] Simple For Loop to Create Div Class Attributes

2010-03-04 Thread Alex Wallace
AFAIK, Ruby interpolation is allowed in the attributes but not in the tag names, which include the shorthand #id and .class for %div's. Best, Alex On Thu, Mar 4, 2010 at 5:44 PM, Michael Narciso wrote: > Hello all, > > Just had a brief conversation with Chris Eppstein as he demonstrated > how I

Re: [haml] Simple For Loop to Create Div Class Attributes

2010-03-04 Thread Michael Narciso
Ah... that's too bad :( Thanks Alex. Alex Wallace wrote: AFAIK, Ruby interpolation is allowed in the attributes but not in the tag names, which include the shorthand #id and .class for %div's. Best, Alex On Thu, Mar 4, 2010 at 5:44 PM, Michael Narciso > wrote:

Re: [haml] Simple For Loop to Create Div Class Attributes

2010-03-04 Thread Chris Eppstein
Yes, that is the state of the current implementation. On Thu, Mar 4, 2010 at 2:49 PM, Alex Wallace wrote: > AFAIK, Ruby interpolation is allowed in the attributes but not in the tag > names, which include the shorthand #id and .class for %div's. > > Best, > Alex > > > On Thu, Mar 4, 2010 at 5:44

Re: [haml] Simple For Loop to Create Div Class Attributes

2010-03-04 Thread Michael Narciso
I'd imagine Ruby code can't be evaluated under a filter such as :textile too? Chris Eppstein wrote: Yes, that is the state of the current implementation. On Thu, Mar 4, 2010 at 2:49 PM, Alex Wallace > wrote: AFAIK, Ruby interpolation is allowed in the attr

[haml] Re: Simple For Loop to Create Div Class Attributes

2010-03-04 Thread Michael Narciso
Scratch that! It can! Brilliant! On Mar 4, 6:14 pm, Michael Narciso wrote: > I'd imagine Ruby code can't be evaluated under a filter such as :textile > too? > > > > Chris Eppstein wrote: > > Yes, that is the state of the current implementation. > > > On Thu, Mar 4, 2010 at 2:49 PM, Alex Wallace