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.
|
class Housing < ApplicationRecord
|
|
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
|