From 75a830e9b39fd44d2f0136b347a4e2bb9eb44888 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Wed, 27 Aug 2025 11:46:48 +0200 Subject: [PATCH] Link to the event/notification source directly E.g: link to comments --- .../bundle_mailer/notification/event/_body.html.erb | 2 +- .../bundle_mailer/notification/mention/_body.html.erb | 2 +- config/routes.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/mailers/notification/bundle_mailer/notification/event/_body.html.erb b/app/views/mailers/notification/bundle_mailer/notification/event/_body.html.erb index 4ad6f204a..89273ef0d 100644 --- a/app/views/mailers/notification/bundle_mailer/notification/event/_body.html.erb +++ b/app/views/mailers/notification/bundle_mailer/notification/event/_body.html.erb @@ -1,7 +1,7 @@ <% event = notification.source %>

- <%= link_to event_notification_title(event), collection_card_url(notification.card.collection, notification.card) %> + <%= link_to event_notification_title(event), notification.source %>

diff --git a/app/views/mailers/notification/bundle_mailer/notification/mention/_body.html.erb b/app/views/mailers/notification/bundle_mailer/notification/mention/_body.html.erb index a53a996bf..93ad1989b 100644 --- a/app/views/mailers/notification/bundle_mailer/notification/mention/_body.html.erb +++ b/app/views/mailers/notification/bundle_mailer/notification/mention/_body.html.erb @@ -1,7 +1,7 @@ <% mention = notification.source %>

- <%= link_to "#{mention.mentioner.first_name} mentioned you", collection_card_url(notification.card.collection, notification.card) %> + <%= link_to "#{mention.mentioner.first_name} mentioned you", event.source %>

diff --git a/config/routes.rb b/config/routes.rb index 6d55b04e5..769cd0ccb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -173,7 +173,7 @@ Rails.application.routes.draw do end resolve "Event" do |event, options| - polymorphic_path(event.target, options) + polymorphic_path(event.eventable, options) end get "up", to: "rails/health#show", as: :rails_health_check