mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 20:24:03 +00:00
11 lines
459 B
Ruby
11 lines
459 B
Ruby
class Contact < ActiveRecord::Base
|
|
attr_accessible :conference_id, :social_tag, :email, :facebook, :googleplus, :twitter, :instagram, :public
|
|
belongs_to :conference
|
|
|
|
validates :conference, presence: true
|
|
# Conferences only have one contact
|
|
validates :conference_id, uniqueness: {message: "has already contact details"}
|
|
|
|
validates :facebook, :twitter, :googleplus, :instagram,
|
|
format: URI::regexp(%w(http https)), allow_blank: true
|
|
end
|