Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implemented HAML and a first view refactoring

  • Loading branch information...
commit dba18219106b55e14027815dbf2d39e8437b7b2c 1 parent a35b912
Jeff Casimir jcasimir authored
1  Gemfile
View
@@ -2,6 +2,7 @@ source 'http://rubygems.org'
gem 'rails', '3.0.6'
gem 'sqlite3'
+gem 'haml'
group :development, :test do
gem 'rspec-rails'
2  Gemfile.lock
View
@@ -52,6 +52,7 @@ GEM
abstract (>= 1.0.0)
ffi (1.0.7)
rake (>= 0.8.7)
+ haml (3.0.25)
heroku (1.20.1)
launchy (~> 0.3.2)
rest-client (>= 1.4.0, < 1.7.0)
@@ -131,6 +132,7 @@ PLATFORMS
DEPENDENCIES
autotest
capybara
+ haml
heroku
jquery-rails
mocha
18 app/views/companies/index.html.erb
View
@@ -1,18 +0,0 @@
-<% title "Companies" %>
-
-<div class="companies">
- <% @companies.each do |company| %>
- <div class="company">
- <h4><%= company.name %></h4>
- <%= render :partial => 'email_addresses/email_addresses', :object => company.email_addresses %>
- <%= render :partial => 'phone_numbers/phone_numbers', :object => company.phone_numbers %>
- <ul class="actions">
- <%= link_to "Show", company %>
- <%= link_to "Edit", edit_company_path(company) %>
- <%= link_to "Destroy", company, :confirm => 'Are you sure?', :method => :delete %>
- </ul>
- </div>
- <% end %>
-</div>
-
-<p><%= link_to "New Company", new_company_path %></p>
14 app/views/companies/index.html.haml
View
@@ -0,0 +1,14 @@
+- title "Companies"
+
+%div.companies
+ - @companies.each do |company|
+ div.company
+ %h4= company.name
+ = 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
Please sign in to comment.
Something went wrong with that request. Please try again.