Need url helpers

This commit is contained in:
Jason Zimdars
2025-07-15 18:48:49 -05:00
parent 7dbb9c7a9e
commit c8eb1c616d
+5 -3
View File
@@ -1,4 +1,6 @@
class NotificationPusher
include Rails.application.routes.url_helpers
attr_reader :notification
def initialize(notification)
@@ -34,7 +36,7 @@ class NotificationPusher
def build_event_payload
event = notification.source
card = event.card
case event.action
when "comment_created"
{
@@ -78,7 +80,7 @@ class NotificationPusher
def build_mention_payload
mention = notification.source
card = mention.card
{
title: "#{mention.mentioner.first_name} mentioned you",
body: mention.source.mentionable_content.truncate(200),
@@ -115,4 +117,4 @@ class NotificationPusher
def strip_tags(text)
ActionView::Base.full_sanitizer.sanitize(text)
end
end
end