Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Contacts#index</h1>
- <p>Find me in app/views/contacts/index.html.erb</p>
- <% if flash[:notice] %>
- <div class="notice"><%= flash[:notice] %></div>
- <% end %>
- <table border = "1">
- <thead>
- <tr>
- <td>Firstname</td>
- <td>Lastname</td>
- <td>Email</td>
- <td>Twitter</td>
- </tr>
- </thead>
- <tbody>
- <% @contacts.each do |contact| %>
- <tr>
- <td><%= h contact.first_name %></td>
- <td><%= h contact.last_name %></td>
- <td><%= h contact.email %></td>
- <td><%= h contact.twitter %></td>
- <td><%= link_to "[Edit]", edit_contact_path(contact) %></td>
- <td><%= link_to "[Delete]", contact_path(contact), :method=>"delete"%></td>
- </tr>
- <% end %>
- </tbody>
- </table>
- <%= link_to "Add a contact", new_contact_path %>
- <!--<%= link_to "Add a contact", new_contact_url %>-->
Add Comment
Please, Sign In to add comment