Fixed hosting bug

This commit is contained in:
Godwin
2017-01-09 22:43:39 -08:00
parent bf11544c2a
commit 8bdb96777a
9 changed files with 38 additions and 10 deletions
+4
View File
@@ -29,6 +29,10 @@ class ConferenceRegistration < ActiveRecord::Base
[:vegan, :smoking, :pets, :quiet]
end
def city
city_id.present? ? City.find(city_id) : nil
end
def status(was = false)
return :unregistered if user.nil? || user.firstname.blank? || self.send(was ? :city_was : :city).blank?
return :registered if self.send(was ? :housing_was : :housing).present? || (self.send(was ? :can_provide_housing_was : :can_provide_housing) && (self.send(was ? :housing_data_was : :housing_data) || {})['availability'].present?)