diff --git a/app/models/event.rb b/app/models/event.rb index 2db7f8a..5c73365 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -1,6 +1,9 @@ class Event < ActiveRecord::Base include Proposable + has_one :track, through: :proposition, source: :proposition_accepting, source_type: Track + has_one :conference, through: :track + validates :title, presence: true validates :length, presence: true, numericality: {only_integer: true, greater_than: 0} validates :abstract, presence: true