Closed Bartlebyy closed 8 years ago
When loading the main page in my local dev environment, I had no events for the future, which caused the page to crash.
It crashed because of the line @events.title. The method title could not be called on nil.
@events.title
title
nil
If @events is nil it will now show 'No Events Posted.' I also added the gem 'better errors' to help with debugging.
@events
:fireworks:
Thanks!
Problem
When loading the main page in my local dev environment, I had no events for the future, which caused the page to crash.
Cause
It crashed because of the line
@events.title
. The methodtitle
could not be called onnil
.Solution
If
@events
isnil
it will now show 'No Events Posted.' I also added the gem 'better errors' to help with debugging.