Move Conference contact details to Contact

This commit is contained in:
Henne Vogelsang 2014-07-31 20:09:38 +02:00
parent eb3e6898d2
commit 5aa0d58c57
18 changed files with 67 additions and 58 deletions

View file

@ -1,8 +1,11 @@
class Contact < ActiveRecord::Base
attr_accessible :conference, :social_tag, :email, :facebook, :googleplus, :twitter, :instagram, :public
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 :conference_id, uniqueness: {message: "has already contact details"}
validates :facebook, :twitter, :googleplus, :instagram,
format: URI::regexp(%w(http https)), allow_blank: true
end