0a9428093c
git-subtree-dir: RubyFun git-subtree-mainline:a04a502787
git-subtree-split:b01c682613
30 lines
692 B
Plaintext
30 lines
692 B
Plaintext
<%= form_for(@person) do |f| %>
|
|
<% if @person.errors.any? %>
|
|
<div id="error_explanation">
|
|
<h2><%= pluralize(@person.errors.count, "error") %> prohibited this person from being saved:</h2>
|
|
|
|
<ul>
|
|
<% @person.errors.full_messages.each do |msg| %>
|
|
<li><%= msg %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="field">
|
|
<%= f.label :name %><br />
|
|
<%= f.text_field :name %>
|
|
</div>
|
|
<div class="field">
|
|
<%= f.label :age %><br />
|
|
<%= f.number_field :age %>
|
|
</div>
|
|
<div class="field">
|
|
<%= f.label :zipcode %><br />
|
|
<%= f.text_field :zipcode %>
|
|
</div>
|
|
<div class="actions">
|
|
<%= f.submit %>
|
|
</div>
|
|
<% end %>
|