mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-13 01:10:39 -07:00
more scaffolding
This commit is contained in:
parent
7e051222aa
commit
392696301c
66 changed files with 1110 additions and 241 deletions
5
app/models/district.rb
Normal file
5
app/models/district.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class District < ApplicationRecord
|
||||
has_many :schools
|
||||
|
||||
validates :name, presence: true
|
||||
end
|
||||
|
|
@ -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
7
app/models/school.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class School < ApplicationRecord
|
||||
belongs_to :district
|
||||
has_many :recipients
|
||||
|
||||
validates :name, presence: true
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue