Secure against calling methods on nil

This commit is contained in:
Petko Bordjukov 2015-08-15 08:13:03 +03:00
parent 15b843b233
commit ca8a655731
1 changed files with 1 additions and 1 deletions

View File

@ -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'