mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-10 07:50:33 -07:00
Update the data uploader script to read the language from the csv and update the language information for any parent items that already exist (or create database entries if none already exist)
19 lines
323 B
Ruby
19 lines
323 B
Ruby
class Housing < ApplicationRecord
|
|
has_many :parents, dependent: :nullify
|
|
|
|
def self.to_designation(housing)
|
|
return "Unknown" if housing.blank?
|
|
|
|
housing = housing
|
|
case housing
|
|
in /^1$/i
|
|
"Own"
|
|
in /^2$/i
|
|
"Rent"
|
|
in /^99$|^100$/i
|
|
"Unknown"
|
|
else
|
|
"Unknown"
|
|
end
|
|
end
|
|
end
|