Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d2d85cff71
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (43 sloc) 1.157 kb
<%= form_for(setup_user @user) do |f| %>
<% if @user.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div>
<%= f.label :email %>
<%= f.text_field :email %>
</div>
<%= f.fields_for :address do |ff| %>
<div>
<%= ff.label :city %>
<%= ff.text_field :city %>
</div>
<% end %>
<%= f.fields_for :interest_users do |ff| %>
<div>
<%= ff.hidden_field :interest_id %>
<%= ff.check_box :_destroy, {:checked => ff.object.persisted?}, '0', '1' %>
<%= ff.label :_destroy, ff.object.interest.name %>
</div>
<% end %>
<h2>Tasks</h2>
<%= f.fields_for :tasks do |ff| %>
<div>
<%= ff.label :name %>
<%= ff.text_field :name %>
<% if ff.object.persisted? %>
<%= ff.check_box :_destroy %>
<%= ff.label :_destroy, "Destroy" %>
<% end %>
</div>
<% end %>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
Jump to Line
Something went wrong with that request. Please try again.