mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 22:21:11 +00:00
Add possibility to link to mastodon
This commit is contained in:
parent
979377f2df
commit
e1e0bdb4fc
13 changed files with 92 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue