working on schedules

This commit is contained in:
Jared Cosulich 2017-03-06 11:35:29 -05:00
parent 72418edd7c
commit 2fb55a7443
26 changed files with 726 additions and 1 deletions

11
app/models/schedule.rb Normal file
View file

@ -0,0 +1,11 @@
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
end

View file

@ -1,4 +1,5 @@
class School < ApplicationRecord
has_many :schedules
has_many :recipient_lists
belongs_to :district
has_many :recipients