mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
13 lines
383 B
Ruby
13 lines
383 B
Ruby
class Schedule < ApplicationRecord
|
|
belongs_to :school
|
|
belongs_to :recipient_list
|
|
belongs_to :question_list
|
|
has_many :recipient_schedules
|
|
|
|
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
|