There's nothing magical about render collection. Just do this instead:

%ul  - for user in @users
    %li= render :partial => "user/card_collapsed", :object => user, :as =>
:user

On Wed, Sep 9, 2009 at 3:55 PM, mtin79 <[email protected]> wrote:

>
> i just posted this on the haml IRC chat. but at the moment nobody
> seems to be availbale :
>
> mtin79: hey out there!
> [00:50] mtin79: i have a short question about how to call a block on a
> render partial call in haml
> [00:51] mtin79: = render (:partial => "user/
> card_collapsed", :collection => @users, :as => :user) { |text, user|
> "<li> #{text}</li>"}
> [00:51] mtin79: as you can see want to render a partial over a
> collection. but i need each partial to be wrapped in a <li> -tag
> [00:52] mtin79: but the above statements just renders the partials
> without the wrapping
>
> any help is highly appreciated!
> thanks.
> >
>

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