Show account if you have multiple

It's hard to know which account email notifications are coming from
This commit is contained in:
Jason Zimdars
2025-11-20 22:03:54 -06:00
parent 93375f59cd
commit 9bae30f771
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ class Notification::BundleMailer < ApplicationMailer
mail \
to: bundle.user.identity.email_address,
subject: "Latest Activity in Fizzy"
subject: "Fizzy#{ " (#{ Current.account.name })" if @user.identity.accounts.many? }: Latest Activity"
end
end
@@ -1,7 +1,9 @@
<tr>
<td>
<h1 class="title">Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %></h1>
<p class="subtitle margin-block-end-double">You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.</p>
<p class="subtitle margin-block-end-double">
You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %><%= " in #{ Current.account.name }" if @user.identity.accounts.many? %>.
</p>
<% @notifications.group_by(&:card).each do |card, notifications| %>
<h2 class="notification__board"><%= card.board.name %></h2>
@@ -1,5 +1,5 @@
Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %>
You have <%= pluralize @notifications.count, "new notification" %>.
You have <%= pluralize @notifications.count, "new notification" %><%= " in #{ Current.account.name }" if @user.identity.accounts.many? %>.
<% @notifications.group_by(&:card).each do |card, notifications| %>
--------------------------------------------------------------------------------