Skip to content

Commit

Permalink
gravatar
Browse files Browse the repository at this point in the history
  • Loading branch information
markchang committed Jun 26, 2012
1 parent e928e74 commit 497b2e2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -22,3 +22,4 @@ end
gem 'jquery-rails'
gem 'simple_form'
gem 'bootstrap-sass'
gem 'gravatar_image_tag'
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -42,6 +42,7 @@ GEM
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
gravatar_image_tag (1.1.3)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
Expand Down Expand Up @@ -125,6 +126,7 @@ PLATFORMS
DEPENDENCIES
bootstrap-sass
coffee-rails (~> 3.2.1)
gravatar_image_tag
jquery-rails
pg
rails (= 3.2.6)
Expand Down
2 changes: 2 additions & 0 deletions app/views/contacts/index.html.erb
Expand Up @@ -3,13 +3,15 @@
<table class="table table-striped">
<thead>
<tr>
<th><b>Pic</b></th>
<th><b>Name</b></th>
<th><b>Email</b></th>
<th><b>Phone</b></th>
</tr>
</thead>
<% @contacts.each do |c| %>
<tr>
<td><%= gravatar_image_tag c.email, gravatar: { size: 25 } %></td>
<td><%= link_to "#{c.first_name} #{c.last_name}", c %></td>
<td><%= c.email %></td>
<td><%= number_to_phone(c.phone) %></td>
Expand Down
2 changes: 2 additions & 0 deletions app/views/contacts/show.html.erb
Expand Up @@ -9,12 +9,14 @@
<table class="table table-striped">
<thead>
<tr>
<th><b>Pic</b></th>
<th><b>Name</b></th>
<th><b>Email</b></th>
<th><b>Phone</b></th>
</tr>
</thead>
<tr>
<td><%= gravatar_image_tag @contact.email %></td>
<td><%= "#{@contact.first_name} #{@contact.last_name}" %></td>
<td><%= @contact.email %></td>
<td><%= number_to_phone(@contact.phone) %></td>
Expand Down

0 comments on commit 497b2e2

Please sign in to comment.