mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-15 09:45:53 -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/ell.rb
Normal file
20
app/models/dashboard/ell.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
module Dashboard
|
||||
class Ell < ApplicationRecord
|
||||
scope :by_designation, -> { all.map { |ell| [ell.designation, ell] }.to_h }
|
||||
|
||||
include FriendlyId
|
||||
|
||||
friendly_id :designation, use: [:slugged]
|
||||
|
||||
def self.to_designation(ell)
|
||||
case ell
|
||||
in /lep student 1st year|LEP student not 1st year|EL Student First Year|LEP\s*student/i
|
||||
"ELL"
|
||||
in /Does not apply/i
|
||||
"Not ELL"
|
||||
else
|
||||
"Unknown"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue