From 72b8a7578cb6a619e498e2b16fb7a35db1cab76f Mon Sep 17 00:00:00 2001 From: Felix Wolfsteller Date: Thu, 5 Dec 2024 15:45:37 +0100 Subject: [PATCH] show more intent in interactor (through comments) --- app/interactors/donate.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/interactors/donate.rb b/app/interactors/donate.rb index cda697a..0732dfe 100644 --- a/app/interactors/donate.rb +++ b/app/interactors/donate.rb @@ -6,10 +6,14 @@ def call(receiver_id, amount_in_cents) receiver: Receiver.find_by(id: receiver_id), amount_in_cents: ) - # payment = Payment.new() + + # setup payment + Donation.transaction do donation.save # payment.save + # send mails + # .... end DonateResult.new(success: donation.persisted?, donation:)