diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 3e7044376..3c36cc51a 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -48,7 +48,7 @@ module NotificationsHelper private def event_notification_action(event) - if event.initial_assignment? + if event.action.card_published? && event.eventable.assigned_to?(event.creator) "card_assigned" else event.action diff --git a/app/models/event.rb b/app/models/event.rb index 17f9006c4..1775e640a 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -17,9 +17,4 @@ class Event < ApplicationRecord def notifiable_target eventable end - - # TODO: This doesn't belong here anymore - def initial_assignment? - action == "card_published" && eventable.assigned_to?(creator) - end end