mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-14 17:25:55 -07:00
dirty commit: can't get references to work correctly between any tables
This commit is contained in:
parent
e1f0b78236
commit
a4fddbeced
183 changed files with 5461 additions and 5 deletions
20
app/models/dashboard/sped.rb
Normal file
20
app/models/dashboard/sped.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
module Dashboard
|
||||
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
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue