
One of my consulting clients recently asked me to investigate a bug causing an unhandled exception in their production Rails app. The Bugsnag issue looked like countless others any Rubyist has no doubt reviewed before: undefined method `invitation_accepted_at' for nil:NilClass. This type of error indicates the code was expecting an object to have been returned when it wasn’t. A method was being...