Rubocop autocorrections

This commit is contained in:
James Mason 2018-11-13 18:01:49 -08:00
parent 299738f58d
commit 43bef689fc
85 changed files with 622 additions and 578 deletions

View file

@ -13,7 +13,7 @@ class Payment < ApplicationRecord
validates :conference_id, presence: true
enum status: {
unpaid: 0,
unpaid: 0,
success: 1,
failure: 2
}
@ -23,11 +23,11 @@ class Payment < ApplicationRecord
end
def purchase
gateway_response = Stripe::Charge.create source: stripe_customer_token,
gateway_response = Stripe::Charge.create source: stripe_customer_token,
receipt_email: stripe_customer_email,
description: "ticket purchases(#{user.username})",
amount: amount_to_pay,
currency: conference.tickets.first.price_currency
description: "ticket purchases(#{user.username})",
amount: amount_to_pay,
currency: conference.tickets.first.price_currency
self.amount = gateway_response[:amount]
self.last4 = gateway_response[:source][:last4]