motion-prime/sections/form.rb in motion-prime-0.4.0 vs motion-prime/sections/form.rb in motion-prime-0.4.1

- old
+ new

@@ -286,15 +286,20 @@ reset_data init_form_fields table_view.reloadData end + def reset_data + super + self.fields.values.each(&:clear_observers) + end + private def init_form_fields self.fields = {} self.field_indexes = {} section_indexes = [] - (self.class.fields_options || []).each do |key, field| + (self.class.fields_options || {}).each do |key, field| next unless render_field?(key, field) section_id = field[:group].to_i @groups_count = [@groups_count || 1, section_id + 1].max self.fields[key] = load_field(field) \ No newline at end of file