On 26 Sep 2007, at 23:57, Michael Koziarski wrote:

>
> On 9/25/07, Frederick Cheung <[EMAIL PROTECTED]> wrote:
>>
>> I love form_for, but I really hate
>>
>> <% form_for :person, @person, :url => {...} do |f| %>
>>    ...
>>    <%= render :partial => 'form', :locals => {'f' => f}
>
> You can already do:
>
>   <%= render :partial=>'form', :object=>f %>
>
> Which at least avoids the duplication in :locals.
>
> It seems funny to me to have the form builder classes know about
> rendering partials, or even rendering at all?

To a large extent I'm nostalgic about being able to do <%=  
render :partial=>'form' %>. :object=>f is better than :locals (should  
of thought of that one), but it still seems a little redundant to  
have to say 'and yes I do actually want my form builder available in  
the partial. Maybe the form builder classes aren't the place for this  
but I couldn't think of another way.

Fred

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