Sha256: c87e321768efc721c9c66b61cf8b89468728027c9760516745d4812615e70559
Contents?: true
Size: 658 Bytes
Versions: 21
Compression:
Stored size: 658 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 event_class_instance.resource_url end end end
Version data entries
21 entries across 21 versions & 1 rubygems