> i'm having problem with a form_for situation where i'm trying to DRY
> out the repeated parts of my forms and put them in common/form and
> render the form elements via another partial in controller_name/_form.
> Here's the first form
>
> # app/views/common/form
> <% form_for ... do |f| -%>
>   <%= render :partial => "params[:controller]/form", :object => f %>
>   <p>Submit buttons...</p>
> <% end -%>

I had exactly the same problem and ending up putting the

form_for ...do |f|

in the partial so I didn't have to pass form builders around.  This  
won't be practical though if you are using multiple partials for your  
forms fields.

Rupert

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to