Sha256: 8062e1a105d62e407c9295d22ce1cd0711d1352b657f26920f53d4b69e9a2f18
Contents?: true
Size: 902 Bytes
Versions: 28
Compression:
Stored size: 902 Bytes
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 create system notifications, which # will be later listed to the user in their Notifications Dashboard. # # This modules adds the needed logic to display these notifications. # # Example: # # class MyEvent < Decidim::Events::BaseEvent # include Decidim::Events::NotificationEvent # end module NotificationEvent extend ActiveSupport::Concern included do types << :notification def notification_title I18n.t( "decidim.events.notification_event.notification_title", resource_title: resource_title, resource_path: resource_path ).html_safe end end end end end
Version data entries
28 entries across 28 versions & 2 rubygems