Skip to content

Commit

Permalink
fix destroy sende
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisZackharov committed Nov 4, 2023
1 parent 0e162d2 commit 088c13b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/interactors/projects/destroy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ module Projects
class Destroy
include Interactor

delegate :project, to: :context
delegate :project, :users, to: :context

before do
context.users = project.users
context.users = User.where(id: project.users.pluck(:id))
end

def call
project.destroy
end

after do
context.users.each do |user|
users.each do |user|
ProjectMailer.project_destroyed(user).deliver_later
end
end
Expand Down

0 comments on commit 088c13b

Please sign in to comment.