From fc413fd7f6b98b428aa76eacf93327dc6d2dbf21 Mon Sep 17 00:00:00 2001 From: Godwin Date: Tue, 22 Aug 2017 15:04:44 -0700 Subject: [PATCH] Fixed an issue with date parsing --- app/helpers/i18n_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/i18n_helper.rb b/app/helpers/i18n_helper.rb index 1b56ebe..fa39abe 100644 --- a/app/helpers/i18n_helper.rb +++ b/app/helpers/i18n_helper.rb @@ -32,6 +32,7 @@ module I18nHelper end def date(date, format = :long) + return '' unless date.present? I18n.l(date.is_a?(String) ? Date.parse(date) : date, format: format) end