Implements Contacts

This commit is contained in:
Henne Vogelsang 2014-07-31 18:49:46 +02:00
parent 4955b2b7b8
commit eb3e6898d2
9 changed files with 156 additions and 5 deletions

8
app/models/contact.rb Normal file
View file

@ -0,0 +1,8 @@
class Contact < ActiveRecord::Base
attr_accessible :conference, :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"}
end