I have Recommendations that has_many Approvals.
I have a form partial from scaffolded Recommendations.
<%= f.fields_for :approval do |f| %>
<%= f.text_field :email %>
<% end %>
In the new action this builds an approval: @recommendation.approvals.build
In the edit action the field is blank. I need someone to be able to edit this if the email provided is incorrect or something. But with a has_many association how do I edit the email address of this first approval?
thanks so much for your help!
You have to use
fields_for :approvalS.