On 10/1/07, Michael Koziarski <[EMAIL PROTECTED]> wrote:
>
> > so in render_partial, case FormBuilder does render :partial => "#
> > {f.object.class}/_form.format.erb", :object => f (apologies for
> > pseudoness of code) ?
>
> Yeah, that's what I've been doing, and depending on the implementation
> required it seems like it should be ok...
>
> I can see mislav's point on coupling, but it seems consistent with the
> current behaviour where:
>
>  render :partial=>@foo -> /foos/_foo.html.erb

http://pastie.caboo.se/pastes/101420

This simple patch allows for render :partial => f, begin f a
FormBuilder, to render /_form.html.erb, and being f a
LabelledFormBuilder to render /_labelled_form.html.erb. It looks for
any FormBuilder subclass, and also sets the local variable name to
form, labelled_form, or whatever form builder you're using...

I don't know if there's a ticket already for this, and if anybody
wants this applied anyway... :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to