mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
Fix rubocop issues
This commit is contained in:
@@ -30,7 +30,7 @@ module Spree
|
||||
flash[:error] = I18n.t(:card_could_not_be_removed)
|
||||
end
|
||||
redirect_to account_path(anchor: 'cards')
|
||||
rescue Stripe::CardError => e
|
||||
rescue Stripe::CardError
|
||||
flash[:error] = I18n.t(:card_could_not_be_removed)
|
||||
redirect_to account_path(anchor: 'cards')
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ module Spree
|
||||
provider.purchase(*options_for_purchase_or_auth(money, creditcard, gateway_options))
|
||||
end
|
||||
|
||||
def void(response_code, creditcard, gateway_options)
|
||||
def void(response_code, _creditcard, gateway_options)
|
||||
gateway_options[:stripe_account] = stripe_account_id
|
||||
provider.void(response_code, gateway_options)
|
||||
end
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
class Api::Admin::PaymentMethodSerializer < ActiveModel::Serializer
|
||||
delegate :serializable_hash, to: :method_serializer
|
||||
module Api
|
||||
module Admin
|
||||
class PaymentMethodSerializer < ActiveModel::Serializer
|
||||
delegate :serializable_hash, to: :method_serializer
|
||||
|
||||
def method_serializer
|
||||
if object.type == 'Spree::Gateway::StripeConnect'
|
||||
Api::Admin::PaymentMethod::StripeSerializer.new(object)
|
||||
else
|
||||
Api::Admin::PaymentMethod::BaseSerializer.new(object)
|
||||
def method_serializer
|
||||
if object.type == 'Spree::Gateway::StripeConnect'
|
||||
Api::Admin::PaymentMethod::StripeSerializer.new(object)
|
||||
else
|
||||
Api::Admin::PaymentMethod::BaseSerializer.new(object)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user