Sha256: 2e48c0b72db0927be8450887e7d0572a3f9515bdee55957954a487566866849e
Contents?: true
Size: 1.24 KB
Versions: 31
Compression:
Stored size: 1.24 KB
Contents
# frozen-string_literal: true module Decidim module Events # This module is used to be included in event classes (those inheriting from # `Decidim::Events::BaseEvent`) that need to send emails with the notification. # # This modules adds the needed logic to deliver emails to a given user. # # Example: # # class MyEvent < Decidim::Events::BaseEvent # include Decidim::Events::EmailEvent # end module EmailEvent extend ActiveSupport::Concern included do type :email def email_subject I18n.t("decidim.events.email_event.email_subject", resource_title: resource_title) end def email_greeting I18n.t("decidim.events.email_event.email_greeting", user_name: user.name) end def email_intro I18n.t("decidim.events.email_event.email_intro", resource_title: resource_title) end def email_outro I18n.t("decidim.events.email_event.email_outro", resource_title: resource_title) end def has_button? button_text.present? && button_url.present? end def button_text nil end def button_url nil end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems