You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
408 B
18 lines
408 B
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|true/i
|
|
"ELL"
|
|
in /^NA$|^#NA$/i
|
|
"Unknown"
|
|
else
|
|
"Not ELL"
|
|
end
|
|
end
|
|
end
|