more scaffolding

This commit is contained in:
Jared Cosulich 2017-03-01 13:23:54 -05:00
parent 7e051222aa
commit 392696301c
66 changed files with 1110 additions and 241 deletions

5
app/models/district.rb Normal file
View file

@ -0,0 +1,5 @@
class District < ApplicationRecord
has_many :schools
validates :name, presence: true
end

View file

@ -1,2 +1,7 @@
class Recipient < ApplicationRecord
belongs_to :school
validates_associated :school
validates :name, presence: true
end

7
app/models/school.rb Normal file
View file

@ -0,0 +1,7 @@
class School < ApplicationRecord
belongs_to :district
has_many :recipients
validates :name, presence: true
end