I think the tutorial is correct. The Haml code is using string interpolation
(#{}) to include item.id into the ID value.

On Mon, Jul 26, 2010 at 1:27 AM, djnet <[email protected]> wrote:

> for the ERB:
> <div class='item' id='item<%= item.id %>'>
>  <%= item.body %>
> </div>
>
> tutorial gives the HAML:
> .item{:id => "item#{item.id}"}= item.body
>
>
> but this code may includes a difference in 'id' value ?
> i think the right code should be:
> .item{:id => "item#item{item.id}"}= item.body
>
>
> --
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>

-- 
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.

Reply via email to