Fix some rubocop issues in checkout controller

This commit is contained in:
luisramos0
2020-02-04 10:50:12 +00:00
parent 4b345d928c
commit 5ce3e1e0d2
2 changed files with 5 additions and 6 deletions

View File

@@ -372,7 +372,6 @@ Metrics/AbcSize:
- app/controllers/spree/admin/taxons_controller.rb
- app/controllers/spree/admin/users_controller.rb
- app/controllers/spree/admin/variants_controller.rb
- app/controllers/spree/checkout_controller.rb
- app/controllers/spree/credit_cards_controller.rb
- app/controllers/spree/orders_controller.rb
- app/controllers/spree/user_passwords_controller.rb

View File

@@ -82,11 +82,11 @@ class CheckoutController < Spree::StoreController
render json: { path: order_path(@order) }, status: :ok
end
end
rescue Spree::Core::GatewayError => error
rescue Spree::Core::GatewayError => e
# This is done for all actions in the Spree::CheckoutController.
rescue_from_spree_gateway_error(error)
rescue StandardError => error
Bugsnag.notify(error)
rescue_from_spree_gateway_error(e)
rescue StandardError => e
Bugsnag.notify(e)
flash[:error] = I18n.t("checkout.failed")
update_failed
end
@@ -204,7 +204,7 @@ class CheckoutController < Spree::StoreController
def setup_for_current_state
method_name = :"before_#{@order.state}"
send(method_name) if respond_to?(method_name, true)
__send__(method_name) if respond_to?(method_name, true)
end
def before_address