From ca8a655731f940e46dfcd3fb2a517b0e7f8bf6d1 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sat, 15 Aug 2015 08:13:03 +0300 Subject: [PATCH] Secure against calling methods on nil --- lib/initfest/views/public/home/_event_type.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/initfest/views/public/home/_event_type.slim b/lib/initfest/views/public/home/_event_type.slim index 8c51604..0b443b7 100644 --- a/lib/initfest/views/public/home/_event_type.slim +++ b/lib/initfest/views/public/home/_event_type.slim @@ -1 +1 @@ -=> link_to t('views.welcome.submit_event', event_type: event_type.name.mb_chars.downcase), new_event_path(type: event_type.id), class: 'btn-link btn-link-large' +=> link_to t('views.welcome.submit_event', event_type: event_type.name.try(:mb_chars).try(:downcase)), new_event_path(type: event_type.id), class: 'btn-link btn-link-large'