Browse Source

Fixed saving housing availability

development
Godwin 8 years ago
parent
commit
2fe8b3c93d
  1. 10
      app/controllers/conferences_controller.rb

10
app/controllers/conferences_controller.rb

@ -847,7 +847,15 @@ class ConferencesController < ApplicationController
user_changed = true user_changed = true
when :is_attending when :is_attending
registration.is_attending = value.present? ? 'y' : 'n' registration.is_attending = value.present? ? 'y' : 'n'
when :address, :phone, :first_day, :last_day, :notes when :first_day
registration.housing_data ||= {}
registration.housing_data['availability'] ||= []
registration.housing_data['availability'][0] = value
when :last_day
registration.housing_data ||= {}
registration.housing_data['availability'] ||= []
registration.housing_data['availability'][1] = value
when :address, :phone, :notes
registration.housing_data ||= {} registration.housing_data ||= {}
registration.housing_data[key.to_s] = value registration.housing_data[key.to_s] = value
else else

Loading…
Cancel
Save