This is a Ruby bug. Note that 'my_id_' + 1.to_s +'_element' doesn't work
in IRB, either.
Chris Eppstein wrote:
> It appears to be a haml bug in edge as well.
>
> Can I suggest this syntax, not because it works, but rather because
> it's easier to read:
>
> - 3.times do |i|
> %p{:id => "my_id_#{i}_element"} blah
>
> chris
>
> On Thu, Dec 11, 2008 at 2:46 AM, Christoph Petschnig
> <[email protected] <mailto:[email protected]>> wrote:
>
>
> Hello!
>
> In version 2.0.5 the following code will not compile:
>
> - 3.times do |i|
> %p{:id => 'my_id_'+ i.to_s +'_element'} blah
>
> whereas:
>
> - 3.times do |i|
> %p{:id => 'my_id_'+ i.to_s +'_element'} blah
>
> will compile. The difference are `+'` and `+ '`, no whitespace between
> the plus and the quote.
>
> Just for your information. Regards
>
> Christoph
>
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---