clarion/app/models/event.rb

15 lines
491 B
Ruby
Raw Normal View History

class Event < ActiveRecord::Base
2015-04-20 18:37:05 +03:00
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
validates :description, presence: true
2014-09-04 00:39:54 +03:00
validates :agreement, acceptance: true
2015-04-20 18:37:14 +03:00
scope :confirmed, -> { where.not confirmed_at: nil }
end