Skip to content

Commit

Permalink
Cleanup to match tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
jcasimir committed Apr 23, 2011
1 parent 62b6bd5 commit 5b007f1
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 48 deletions.
4 changes: 2 additions & 2 deletions app/views/companies/edit.html.erb
Original file line number Diff line number Diff line change
@@ -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' %>
12 changes: 0 additions & 12 deletions app/views/companies/index.html.erb

This file was deleted.

8 changes: 4 additions & 4 deletions app/views/companies/index.html.haml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 0 additions & 18 deletions app/views/people/index.html.erb

This file was deleted.

14 changes: 14 additions & 0 deletions app/views/people/index.html.haml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions app/views/people/show.html.erb
Original file line number Diff line number Diff line change
@@ -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" %>
Expand Down
9 changes: 0 additions & 9 deletions app/views/phone_numbers/_list.html.erb

This file was deleted.

0 comments on commit 5b007f1

Please sign in to comment.