Class: Decidim::NotificationsDigestPresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/decidim/notifications_digest_presenter.rb

Overview

Decorator for events in mail digest

Instance Method Summary collapse

Instance Method Details

#formated_date(date) ⇒ Object



16
17
18
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 16

def formated_date(date)
  I18n.l(date, format: :long)
end

#greetingObject



20
21
22
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 20

def greeting
  I18n.t("decidim.notifications_digest_mailer.hello", name:)
end

#headerObject



12
13
14
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 12

def header
  I18n.t("decidim.notifications_digest_mailer.header.#{frequency}")
end

#introObject



24
25
26
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 24

def intro
  I18n.t("decidim.notifications_digest_mailer.intro.#{frequency}")
end

#outroObject



28
29
30
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 28

def outro
  I18n.t("decidim.notifications_digest_mailer.outro")
end

#see_moreObject



32
33
34
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 32

def see_more
  I18n.t("decidim.notifications_digest_mailer.see_more")
end

#subjectObject



8
9
10
# File 'app/presenters/decidim/notifications_digest_presenter.rb', line 8

def subject
  I18n.t("decidim.notifications_digest_mailer.subject")
end