mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-08 23:08:14 -07:00
chore: seed enrollment
This commit is contained in:
parent
bd8dfe45d3
commit
0af7d42e52
9 changed files with 97 additions and 53 deletions
|
|
@ -1,5 +1,7 @@
|
|||
module Dashboard
|
||||
class AcademicYear < ApplicationRecord
|
||||
scope :by_range, -> { all.map { |ay| [ay.range, ay] }.to_h }
|
||||
|
||||
def self.find_by_date(date)
|
||||
year = parse_year_range(date:)
|
||||
range = "#{year.start}-#{year.end.to_s[2, 3]}"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ module Dashboard
|
|||
validates :name, presence: true
|
||||
|
||||
scope :alphabetic, -> { order(name: :asc) }
|
||||
scope :school_hash, -> { all.map { |school| [school.dese_id, school] }.to_h }
|
||||
scope :by_dese_id, -> { all.map { |school| [school.dese_id, school] }.to_h }
|
||||
|
||||
def self.find_by_district_code_and_school_code(district_code, school_code)
|
||||
School
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue