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.
sqm-dashboards/app/models/housing.rb

20 lines
323 B

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