diff --git a/Gemfile b/Gemfile index 61f9388..edebac5 100644 --- a/Gemfile +++ b/Gemfile @@ -22,3 +22,4 @@ end gem 'jquery-rails' gem 'simple_form' gem 'bootstrap-sass' +gem 'gravatar_image_tag' diff --git a/Gemfile.lock b/Gemfile.lock index 2799903..3080c9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -125,6 +126,7 @@ PLATFORMS DEPENDENCIES bootstrap-sass coffee-rails (~> 3.2.1) + gravatar_image_tag jquery-rails pg rails (= 3.2.6) diff --git a/app/views/contacts/index.html.erb b/app/views/contacts/index.html.erb index e5ddc57..58b7579 100644 --- a/app/views/contacts/index.html.erb +++ b/app/views/contacts/index.html.erb @@ -3,6 +3,7 @@ + @@ -10,6 +11,7 @@ <% @contacts.each do |c| %> + diff --git a/app/views/contacts/show.html.erb b/app/views/contacts/show.html.erb index c066a74..c349b94 100644 --- a/app/views/contacts/show.html.erb +++ b/app/views/contacts/show.html.erb @@ -9,12 +9,14 @@
Pic Name Email Phone
<%= gravatar_image_tag c.email, gravatar: { size: 25 } %> <%= link_to "#{c.first_name} #{c.last_name}", c %> <%= c.email %> <%= number_to_phone(c.phone) %>
+ +
Pic Name Email Phone
<%= gravatar_image_tag @contact.email %> <%= "#{@contact.first_name} #{@contact.last_name}" %> <%= @contact.email %> <%= number_to_phone(@contact.phone) %>