Class: Decidim::NotificationToMailerPresenter

Inherits:
SimpleDelegator
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
decidim-core/app/presenters/decidim/notification_to_mailer_presenter.rb

Overview

Decorator for notifications in mail digest

Instance Method Summary collapse

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#date_timeObject



16
17
18
19
20
21
22
# File 'decidim-core/app/presenters/decidim/notification_to_mailer_presenter.rb', line 16

def date_time
  if frequency == :daily
    created_at.strftime("%H:%M")
  else
    I18n.l(created_at, format: :decidim_short)
  end
end