mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 15:38:21 -07:00
15 lines
392 B
Ruby
15 lines
392 B
Ruby
class School < ApplicationRecord
|
|
has_many :schedules, dependent: :destroy
|
|
has_many :recipient_lists, dependent: :destroy
|
|
belongs_to :district
|
|
has_many :recipients, dependent: :destroy
|
|
has_many :school_categories, dependent: :destroy
|
|
|
|
validates :name, presence: true
|
|
|
|
scope :alphabetic, -> { order(name: :asc) }
|
|
|
|
include FriendlyId
|
|
friendly_id :name, :use => [:slugged]
|
|
|
|
end
|