From c8eb1c616db172186b7ed9facdda24314d97590f Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 15 Jul 2025 18:48:49 -0500 Subject: [PATCH] Need url helpers --- app/models/notification_pusher.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/notification_pusher.rb b/app/models/notification_pusher.rb index 213b142fa..d54cba472 100644 --- a/app/models/notification_pusher.rb +++ b/app/models/notification_pusher.rb @@ -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 \ No newline at end of file +end