|
|
|
@ -4,11 +4,13 @@ class Race < ApplicationRecord
|
|
|
|
has_many :students, through: :student_races
|
|
|
|
has_many :students, through: :student_races
|
|
|
|
friendly_id :designation, use: [:slugged]
|
|
|
|
friendly_id :designation, use: [:slugged]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: look for alaska native
|
|
|
|
|
|
|
|
# Todo: split up possibilities by first a comma and then the word and
|
|
|
|
def self.qualtrics_code_from(word)
|
|
|
|
def self.qualtrics_code_from(word)
|
|
|
|
case word
|
|
|
|
case word
|
|
|
|
when /Native\s*American|American\s*Indian|Alaskan\s*Native|1/i
|
|
|
|
when /Native\s*American|American\s*Indian|Alaskan\s*Native|1/i
|
|
|
|
1
|
|
|
|
1
|
|
|
|
when /Asian|Pacific\s*Island|2/i
|
|
|
|
when /Asian|Pacific\s*Island|Hawaiian|2/i
|
|
|
|
2
|
|
|
|
2
|
|
|
|
when /Black|African\s*American|3/i
|
|
|
|
when /Black|African\s*American|3/i
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|