0
votes

I want to use "fields_for" to include fields from a related table in a form. In trying to keep things DRY, I'm using a form as a partial (_form.html.erb) for "new" and "edit" actions. The problem is that when I use this approach, the "fields_for" helper doesn't display anything when I render the form partial but if I copy the contents of the form partial in the new or edit view, it works. Is there something special I need to do to get "fields_for" to work inside a rendered partial? I'm working with Rails 3.

1
Please, attach your form code - klew

1 Answers

0
votes

fields_for normally only shows content if there is an object being passed to it. Is it possible that whatever that object is isn't being passed into the partial?