mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
db045dbbf6
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
33 lines
No EOL
711 B
Text
33 lines
No EOL
711 B
Text
<h1>Address Book</h1>
|
|
|
|
<% if @people.empty? %>
|
|
<p>No people in the address book yet</p>
|
|
<% else %>
|
|
<table>
|
|
<tr><th>Name</th><th>Email Address</th><th>Phone Number</th></tr>
|
|
<% for person in @people %>
|
|
<tr><td><%= person.name %></td><td><%= person.email_address %></td><td><%= person.phone_number %></td></tr>
|
|
<% end %>
|
|
</table>
|
|
<% end %>
|
|
|
|
<form action="create_person">
|
|
<p>
|
|
Name:<br />
|
|
<input type="text" name="person[name]">
|
|
</p>
|
|
|
|
<p>
|
|
Email address:<br />
|
|
<input type="text" name="person[email_address]">
|
|
</p>
|
|
|
|
<p>
|
|
Phone number:<br />
|
|
<input type="text" name="person[phone_number]">
|
|
</p>
|
|
|
|
<p>
|
|
<input type="submit" value="Create Person">
|
|
</p>
|
|
</form> |