The below code is throwing "undefined method `name' for nil:NilClass". I've been trying to understand this but everything I read says that try should never throw a NoMethodError when the receiving object is nil.
is_null = summary.alert_type.try(:name) == :null
Aucun commentaire:
Enregistrer un commentaire