Fixed error on stats page due to nil food option

This commit is contained in:
Godwin 2016-08-23 06:38:52 -07:00 committed by GitHub
parent 697b8c5bd5
commit 48a5c2ce90

View File

@ -438,8 +438,10 @@ class ConferencesController < ApplicationController
@bikes += 1 if r.bike == 'yes'
@food[r.food.to_sym] += 1
@food[:all] += 1
if r.food.present?
@food[r.food.to_sym] += 1
@food[:all] += 1
end
if r.registration_fees_paid.present? && r.registration_fees_paid > 0
@donation_count += 1