Mark,

you need to do:

<%- fields_for

with a minus sign



Lawrence

> I'm in the process of trying to migrate a Rails app I started working
> on recently to Merb. I've run into some behavior that I don't
> understand.
>
> I have two nested partials that render a "fields_for" inside a
> "form_for". The weirdness is that the part of the inner partial gets
> rendered twice. Here are the details...
>
>
> ---- new.html.erb ----
> <div>
>       <%= partial :form %>
> </div>
> --------------------------
>
>
> ---- _form.html.erb ----
> <%= form_for @an_object do %>
>
>       <%= partial :fields %>
>
> <% end =%>
> ----------------------------
>
>
> ---- _fields.html.erb ----
> Yo
> <%= fields_for @another_object do %>
>
>       ho ho
>
> <% end =%>
>
> <div>
> and a bottle of rum
> </div>
> -----------------------------
>
>
> ---- browser output ----
> Yo ho ho Yo ho ho
> and a bottle of rum
> -----------------------------
>
> Just to add to my puzzlement, if I remove the = from the erb
> delimiters for "field_for" and its corresponding "end" (like you would
> in Rails), the repetition of Yo ho ho goes away.
>
> Am I doing something wrong here? Or is this just strange?
>
> Mark.
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to