Fix notifications to use the user's account

This commit is contained in:
Mike Dalessio
2025-11-10 16:10:25 -05:00
parent 9697f7b43d
commit b5197fe6d3
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -38,6 +38,6 @@ module AvatarsHelper
end
def avatar_image_tag(user, **options)
image_tag user_avatar_url(user), aria: { hidden: "true" }, size: 48, title: user.name, **options
image_tag user_avatar_url(user, script_name: user.account.slug), aria: { hidden: "true" }, size: 48, title: user.name, **options
end
end
+1 -1
View File
@@ -1,7 +1,7 @@
class Notification < ApplicationRecord
include PushNotifiable
belongs_to :account, default: -> { Current.account }
belongs_to :account, default: -> { user.account }
belongs_to :user
belongs_to :creator, class_name: "User"
belongs_to :source, polymorphic: true
+1 -1
View File
@@ -1,5 +1,5 @@
class Notification::Bundle < ApplicationRecord
belongs_to :account, default: -> { Current.account }
belongs_to :account, default: -> { user.account }
belongs_to :user
enum :status, %i[ pending processing delivered ]