Browse Source

Fixed an issue with date parsing

development
Godwin 7 years ago
committed by GitHub
parent
commit
fc413fd7f6
  1. 1
      app/helpers/i18n_helper.rb

1
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

Loading…
Cancel
Save