Skip to content

Instantly share code, notes, and snippets.

@zeitan
Created May 4, 2010 18:48
Show Gist options
  • Save zeitan/389797 to your computer and use it in GitHub Desktop.
Save zeitan/389797 to your computer and use it in GitHub Desktop.
<% form_for @person do |person_form| %>
<%= person_form.label :name %>
<%= person_form.text_field :name %>
<% person_form.fields_for :children do |child_form| %>
<%= child_form.label :name %>
<%= child_form.text_field :name %>
<% unless child_form.object.new_record? %>
<%= child_form.check_box '_delete' %>
<%= child_form.label '_delete', 'Remove' %>
<% end %>
<% end %>
<%= submit_tag %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment