Permalink
Browse files

Cleanup to match tutorial

  • Loading branch information...
1 parent 62b6bd5 commit 5b007f17e004d62f58290012e28dd868e46aeb69 @jcasimir committed Apr 23, 2011
@@ -1,8 +1,8 @@
<% title "Edit #{@company.name}" %>
-<%= render 'form' %>
-
<ul class="actions">
<li><%= link_to "Show", @company %></li>
<li><%= link_to "View All", companies_path %></li>
</ul>
+
+<%= render 'form' %>
@@ -1,12 +0,0 @@
-<% title "Companies" %>
-
-<p><%= link_to "New Company", new_company_path %></p>
-<div class="companies">
- <% @companies.each do |company| %>
- <div class="company">
- <h4><%= link_to company.name, company %></h4>
- <%= render :partial => "phone_numbers/list", :object => company.phone_numbers %>
- <%= render :partial => "email_addresses/list", :object => company.email_addresses %>
- </div>
- <% end %>
-</div>
@@ -1,14 +1,14 @@
- title "Companies"
+%p= link_to "New Company", new_company_path, :id => "new_company"
+
.companies
- @companies.each do |company|
.company
- %h4= company.name
+ %h4= link_to company, company
= render :partial => 'email_addresses/email_addresses', :object => company.email_addresses
= render :partial => 'phone_numbers/phone_numbers', :object => company.phone_numbers
%ul.actions
= link_to "Show", company
= link_to "Edit", edit_company_path(company)
- = link_to "Destroy", company, :confirm => 'Are you sure?', :method => :delete
-
-%p= link_to "New Company", new_company_path
+ = link_to "Destroy", company, :confirm => 'Are you sure?', :method => :delete
@@ -1,18 +0,0 @@
-<% title "People" %>
-
-<p><%= link_to "New Person", new_person_path, :id => "new_person" %></p>
-
-<div class="people">
- <% @people.each do |person| %>
- <div class="person">
- <h4><%= person.last_name %>, <%= person.first_name %></h4>
- <%= render :partial => 'phone_numbers/phone_numbers', :object => person.phone_numbers %>
- <%= render :partial => 'email_addresses/email_addresses', :object => person.email_addresses %>
- <ul>
- <li><%= link_to "Show", person %></li>
- <li><%= link_to "Edit", edit_person_path(person) %></li>
- <li><%= link_to "Destroy", person, :confirm => 'Are you sure?', :method => :delete %></li>
- </ul>
- </div>
- <% end %>
-</div>
@@ -0,0 +1,14 @@
+- title "People"
+
+%p= link_to "New Person", new_person_path, :id => "new_person"
+
+.people
+ - @people.each do |person|
+ .person
+ %h4= link_to person, person
+ = render :partial => 'email_addresses/email_addresses', :object => person.email_addresses
+ = render :partial => 'phone_numbers/phone_numbers', :object => person.phone_numbers
+ %ul.actions
+ = link_to "Show", person
+ = link_to "Edit", edit_person_path(person)
+ = link_to "Destroy", person, :confirm => 'Are you sure?', :method => :delete
@@ -1,14 +1,14 @@
<div class="person">
- <% title "#{@person.last_name}, #{@person.first_name}" %>
-
<ul class="actions">
<li><%= link_to "Edit", edit_person_path(@person) %></li>
<li><%= link_to "Destroy", @person, :confirm => 'Are you sure?', :method => :delete %></li>
<li><%= link_to "View All", people_path %></li>
</ul>
+ <% title "#{@person.last_name}, #{@person.first_name}" %>
+
<%= render :partial => 'phone_numbers/phone_numbers', :object => @person.phone_numbers %>
- <%= link_to "Add a New Phone Number", new_phone_number_path(:person_id => @person.id ) %>
+ <%= link_to "Add a New Phone Number", new_phone_number_path(:person_id => @person.id ), :id => "new_phone_number" %>
<%= render :partial => 'email_addresses/email_addresses', :object => @person.email_addresses %>
<%= link_to "Add a New Email Address", new_email_address_path(:person_id => @person.id ), :id => "new_email_address" %>
@@ -1,9 +0,0 @@
-<ul class='phone_numbers'>
- <% list.each do |phone_number| %>
- <li>
- <%= phone_number.number%>
- <%= link_to "edit", edit_phone_number_path(phone_number) %>
- <%= link_to "delete", phone_number_path(phone_number), :method => :delete, :id => "delete_phone_number_#{phone_number.id}" %>
- </li>
- <% end %>
-</ul>

0 comments on commit 5b007f1

Please sign in to comment.