Class: Decidim::NotificationToMailerPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Decidim::NotificationToMailerPresenter
- Includes:
- TranslatableAttributes
- Defined in:
- app/presenters/decidim/notification_to_mailer_presenter.rb
Overview
Decorator for notifications in mail digest
Constant Summary collapse
- EXTENDED_NOTIFICATIONS_CLASSES =
[ "Decidim::Comments::CommentCreatedEvent" ].freeze
Instance Method Summary collapse
Methods included from TranslatableAttributes
Instance Method Details
#date_time ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/presenters/decidim/notification_to_mailer_presenter.rb', line 21 def date_time if frequency == :daily created_at.strftime("%H:%M") else I18n.l(created_at, format: :decidim_short) end end |
#show_extended_information? ⇒ Boolean
29 30 31 |
# File 'app/presenters/decidim/notification_to_mailer_presenter.rb', line 29 def show_extended_information? EXTENDED_NOTIFICATIONS_CLASSES.include?(event_class) end |