From 21377e5e9ff83ccc1361dbbb2621dc0a8ca52750 Mon Sep 17 00:00:00 2001 From: Godwin Date: Mon, 18 Jul 2016 10:20:46 -0700 Subject: [PATCH] Fixed nil object error on Schedule page --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 32fa240..309dea9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -462,7 +462,7 @@ class ApplicationController < LinguaFrancaApplicationController def get_scheule_data(do_analyze = true) conference = @this_conference || @conference - @meals = Hash[conference.meals.map{ |k, v| [k.to_i, v] }].sort.to_h + @meals = Hash[(conference.meals || {}).map{ |k, v| [k.to_i, v] }].sort.to_h @events = Event.where(:conference_id => conference.id).order(start_time: :asc) @workshops = Workshop.where(:conference_id => conference.id).order(start_time: :asc) @locations = {}