Sha256: 908df336bb0082cb8e2a17ca7bc655e6a7284dbed7d0cd885f2e20e91f8e7aea
Contents?: true
Size: 654 Bytes
Versions: 3
Compression:
Stored size: 654 Bytes
Contents
# frozen_string_literal: true module Decidim # # Decorator for push notifications. # class PushNotificationPresenter < SimpleDelegator def title event_class.constantize.model_name.human end def body # Not using Rails sanitizers here because they escape HTML entities (i.e &) and we want to keep them Nokogiri::HTML(event_class_instance.notification_title).text if event_class_instance.notification_title.present? end def icon user.organization.attached_uploader(:favicon).variant_url(:big, host: user.organization.host) end def url resource.reported_content_url end end end
Version data entries
3 entries across 3 versions & 1 rubygems