We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

indianocean on 04/27/07


Tagged

form view


Versions (?)


Form with 1:0-1 relationship


Published in: Rails 


using formfor and fieldsfor

  1. <% form_for :user, @display_user, :url => { :action => "update", :id => @display_user} do |f| %>
  2. Mail: <%= f.text_field :mail %>
  3.  
  4. <% fields_for :adressdata, @display_user.adressdata do |adressdata_fields| %>
  5. Lastname : <%= adressdata_fields.text_field :lastname %>
  6. <% end %>
  7. <% end %>

Report this snippet 

You need to login to post a comment.