From 0a4e5dafcb65f37da11ed07a49eb962630c90e10 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 16 Oct 2025 20:12:55 -0500 Subject: [PATCH] Anchor to comments --- app/models/notification_pusher.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/notification_pusher.rb b/app/models/notification_pusher.rb index 000a80fff..65449b0a8 100644 --- a/app/models/notification_pusher.rb +++ b/app/models/notification_pusher.rb @@ -47,7 +47,8 @@ class NotificationPusher when "comment_created" base_payload.merge( title: "RE: #{base_payload[:title]}", - body: comment_notification_body(event) + body: comment_notification_body(event), + path: card_path_with_comment_anchor(event.eventable) ) when "card_assigned" base_payload.merge( @@ -111,4 +112,8 @@ class NotificationPusher def card_path(card) "#{Account.sole.slug}#{Rails.application.routes.url_helpers.card_path(card)}" end + + def card_path_with_comment_anchor(comment) + "#{Account.sole.slug}#{Rails.application.routes.url_helpers.card_path(comment.card, anchor: ActionView::RecordIdentifier.dom_id(comment))}" + end end