9 lines
203 B
Ruby
9 lines
203 B
Ruby
# frozen_string_literal: true
|
|
|
|
class School < ApplicationRecord
|
|
has_many :school_years, dependent: :restrict_with_error
|
|
has_many :years, through: :school_years
|
|
|
|
validates :name, presence: true
|
|
end
|