Add possibility to link to mastodon

This commit is contained in:
Jan-Frederik Rieckers 2017-12-01 20:40:46 +01:00 committed by Ana María Martínez Gómez
parent 979377f2df
commit e1e0bdb4fc
13 changed files with 92 additions and 4 deletions

View file

@ -5,11 +5,11 @@ class Contact < ApplicationRecord
validates :conference, presence: true
# Conferences only have one contact
validates :facebook, :twitter, :googleplus, :instagram,
validates :facebook, :twitter, :googleplus, :instagram, :mastodon,
format: URI::regexp(%w(http https)), allow_blank: true
def has_social_media?
return true if facebook.present? || twitter.present? || googleplus.present? || instagram.present? || email.present?
return true if facebook.present? || twitter.present? || googleplus.present? || instagram.present? || mastodon.present? || email.present?
false
end
end