You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
351 B
13 lines
351 B
class Schedule < ApplicationRecord
|
|
belongs_to :school
|
|
belongs_to :recipient_list
|
|
belongs_to :question_list
|
|
|
|
validates :name, presence: true
|
|
validates :recipient_list, presence: true
|
|
validates :question_list, presence: true
|
|
|
|
scope :active, -> { where(active: true).where("start_date <= ? and end_date > ?", Date.today, Date.today) }
|
|
|
|
end
|