mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 15:38:21 -07:00
17 lines
362 B
Ruby
17 lines
362 B
Ruby
class Sped < ApplicationRecord
|
|
scope :by_designation, -> { all.map { |sped| [sped.designation, sped] }.to_h }
|
|
|
|
include FriendlyId
|
|
|
|
friendly_id :designation, use: [:slugged]
|
|
def self.to_designation(sped)
|
|
case sped
|
|
in /active/i
|
|
"Special Education"
|
|
in /^NA$|^#NA$/i
|
|
"Unknown"
|
|
else
|
|
"Not Special Education"
|
|
end
|
|
end
|
|
end
|