Sean is right: you don't need to (and shouldn't) manually put in "end."
You can use indentation to delineate blocks of Ruby code, like so:
- [1,2,3,4].each do |n|
%div{:id => "div#{n}"}
= n
That's what's causing your templates to break.
- Nathan
bmidgley wrote:
> Nathan,
>
> fwiw, the formatting issue above affects 1.6, but under 1.6 no params
> make it into partials. This works fine in 1.5.2.
>
> div.haml:
> - [1,2,3,4].each do |n|
> %div{:id => "div#{n}"}
> = render :partial => 'd', :locals => {'n' => n, 'expand' => false,
> 'level' => 0}
> - end
>
> _d.haml:
> %ul
> %li= n
> %li= "e" if expand
> %li= level
>
> the output is missing all params:
> <div id='div1'>
> <ul>
> <li></li>
> <li></li>
> <li></li>
> </ul>
> </div>
> <div id='div2'>
> <ul>
> <li></li>
>
> <li></li>
> <li></li>
> </ul>
> </div>
> <div id='div3'>
> <ul>
> <li></li>
> <li></li>
> <li></li>
> </ul>
>
> </div>
> <div id='div4'>
> <ul>
> <li></li>
> <li></li>
> <li></li>
> </ul>
> </div>
>
> Brad
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---