Move Conference contact details to Contact
This commit is contained in:
parent
eb3e6898d2
commit
5aa0d58c57
18 changed files with 67 additions and 58 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue