From 483d9a234e1fbe04bdf227851551040096674a6d Mon Sep 17 00:00:00 2001 From: Carlos Coelho Date: Mon, 7 Mar 2016 09:43:55 -0300 Subject: [PATCH 1/2] Verified contact has email or not issue #764 Signed-off-by: Carlos Coelho --- app/models/contact.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 3e45200a..4f904eeb 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -9,7 +9,7 @@ class Contact < ActiveRecord::Base format: URI::regexp(%w(http https)), allow_blank: true def has_social_media? - return true if !facebook.blank? || !twitter.blank? || !googleplus.blank? || !instagram.blank? + return true if !facebook.blank? || !twitter.blank? || !googleplus.blank? || !instagram.blank? || !email.blank? false end end From fda08ecdb5bfa02088b0764a180d0ffa48d4b126 Mon Sep 17 00:00:00 2001 From: Carlos Coelho Date: Mon, 7 Mar 2016 09:47:21 -0300 Subject: [PATCH 2/2] Added email to social media section related to #764 Signed-off-by: Carlos Coelho --- app/views/conference/_social_media.html.haml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/conference/_social_media.html.haml b/app/views/conference/_social_media.html.haml index eefcbd0c..29eac688 100644 --- a/app/views/conference/_social_media.html.haml +++ b/app/views/conference/_social_media.html.haml @@ -17,3 +17,6 @@ - unless @conference.contact.googleplus.blank? = link_to "#{ @conference.contact.googleplus }" do %i.fa.fa-google-plus-square.fa-4x + - unless @conference.contact.email.blank? + = mail_to "#{ @conference.contact.email }" do + %i.fa.fa-envelope-o.fa-4x