From 5393130e34bc869bd42fc4c461059041c88f161a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Wed, 5 Feb 2020 09:15:56 +0200 Subject: [PATCH] Rename create_payment_method to create_internal_payment_record --- app/models/bank_transaction.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/bank_transaction.rb b/app/models/bank_transaction.rb index 25c6b60e9..105f7d14f 100644 --- a/app/models/bank_transaction.rb +++ b/app/models/bank_transaction.rb @@ -43,10 +43,11 @@ class BankTransaction < ApplicationRecord else 'system_payment' end - record_system_payment(channel: channel, invoice: invoice, registrar: registrar) + create_internal_payment_record(channel: channel, invoice: invoice, + registrar: registrar) end - def record_system_payment(channel: nil, invoice:, registrar:) + def create_internal_payment_record(channel: nil, invoice:, registrar:) if channel.nil? create_activity(invoice.buyer, invoice) return @@ -75,8 +76,8 @@ class BankTransaction < ApplicationRecord validate_invoice_data(invoice) return if errors.any? - record_system_payment(channel: (manual ? 'admin_payment' : nil), invoice: invoice, - registrar: invoice.buyer) + create_internal_payment_record(channel: (manual ? 'admin_payment' : nil), invoice: invoice, + registrar: invoice.buyer) end def validate_invoice_data(invoice)