From 0371c575877060f205776a59c4fa2b22607e4e6f Mon Sep 17 00:00:00 2001 From: Pablo Brasero Date: Thu, 30 Jul 2026 13:12:22 +0100 Subject: [PATCH] Render new_follower using the record directly --- app/models/user_notifications.rb | 1 - app/views/notifications/_new_follower.html.erb | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/models/user_notifications.rb b/app/models/user_notifications.rb index 6cb5df56b..9b6da1fb4 100644 --- a/app/models/user_notifications.rb +++ b/app/models/user_notifications.rb @@ -39,7 +39,6 @@ class UserNotifications end class NewFollowerNotification < Notification - delegate :follower, :to => :record end class NoteCommentNotification < Notification diff --git a/app/views/notifications/_new_follower.html.erb b/app/views/notifications/_new_follower.html.erb index 6732c6be8..f6f5e1c58 100644 --- a/app/views/notifications/_new_follower.html.erb +++ b/app/views/notifications/_new_follower.html.erb @@ -3,14 +3,14 @@

<%= t(".headline") %>

-

<%= friendly_date_ago(notification.timestamp) %>

+

<%= friendly_date_ago(record.created_at) %>

<%= link_to( - user_thumbnail(notification.follower, :class => "img-fluid"), - user_url(notification.follower), + user_thumbnail(record.follower, :class => "img-fluid"), + user_url(record.follower), :target => "_blank", :rel => "noopener" ) %>
@@ -19,12 +19,12 @@ <%= t( ".description_html", :follower_name_with_link => link_to( - notification.follower.display_name, - notification.follower + record.follower.display_name, + record.follower ), :link => link_to( t(".link_text"), - follow_url(notification.follower) + follow_url(record.follower) ) ) %>

-- 2.47.3