This is pretty basic
if you want to share a field name in account object then you would create a partial called _account
and will have to pass the form field as locals to the render call. Othewise you will not be able to use the data between new and update
Update
<% form_for :account, @account, :url => { :action => “update” } do |f| %>
<%= f.error_messages %>
<%= render :partial =>’account’, :locals=>{:f=>f} %>
<%= f.submit ‘Save’ %>
<% end %>
New
<% form_for :emergency_profile, @emergency_profile, :url => { :action => “create” } do |f| %>
<%= f.error_messages %>
<%= render :partial =>’profile’, :locals=>{:f=>f} %>
<%= f.submit ‘Save’ %>
<% end %>
Note the locals being passed in both
Now the partial _account.html.erb looks like
<p><label for=”account_number”> Account Number:</label></p> <%=f.text_field:account_number,:size =>20%>
