|
Revision 1, 0.7 KB
(checked in by dema, 8 years ago)
|
|
Initial import
|
| Rev | Line | |
|---|
| [1] | 1 | <h1>Address Book</h1> |
|---|
| 2 | |
|---|
| 3 | <% if @people.empty? %> |
|---|
| 4 | <p>No people in the address book yet</p> |
|---|
| 5 | <% else %> |
|---|
| 6 | <table> |
|---|
| 7 | <tr><th>Name</th><th>Email Address</th><th>Phone Number</th></tr> |
|---|
| 8 | <% for person in @people %> |
|---|
| 9 | <tr><td><%= person.name %></td><td><%= person.email_address %></td><td><%= person.phone_number %></td></tr> |
|---|
| 10 | <% end %> |
|---|
| 11 | </table> |
|---|
| 12 | <% end %> |
|---|
| 13 | |
|---|
| 14 | <form action="create_person"> |
|---|
| 15 | <p> |
|---|
| 16 | Name:<br /> |
|---|
| 17 | <input type="text" name="person[name]"> |
|---|
| 18 | </p> |
|---|
| 19 | |
|---|
| 20 | <p> |
|---|
| 21 | Email address:<br /> |
|---|
| 22 | <input type="text" name="person[email_address]"> |
|---|
| 23 | </p> |
|---|
| 24 | |
|---|
| 25 | <p> |
|---|
| 26 | Phone number:<br /> |
|---|
| 27 | <input type="text" name="person[phone_number]"> |
|---|
| 28 | </p> |
|---|
| 29 | |
|---|
| 30 | <p> |
|---|
| 31 | <input type="submit" value="Create Person"> |
|---|
| 32 | </p> |
|---|
| 33 | </form> |
|---|