diff --git a/app/controllers/spree/api/base_controller.rb b/app/controllers/spree/api/base_controller.rb index c64223b493..7dc2867eb3 100644 --- a/app/controllers/spree/api/base_controller.rb +++ b/app/controllers/spree/api/base_controller.rb @@ -60,7 +60,7 @@ module Spree !Spree::Api::Config[:requires_authentication] return if api_key.present? - render "spree/api/errors/must_specify_api_key", status: :unauthorized && return + render("spree/api/errors/must_specify_api_key", status: :unauthorized) && return end def authenticate_user @@ -68,7 +68,7 @@ module Spree if requires_authentication? || api_key.present? unless @current_api_user = Spree.user_class.find_by_spree_api_key(api_key.to_s) - render "spree/api/errors/invalid_api_key", status: :unauthorized && return + render("spree/api/errors/invalid_api_key", status: :unauthorized) && return end else # An anonymous user @@ -77,12 +77,12 @@ module Spree end def unauthorized - render "spree/api/errors/unauthorized", status: :unauthorized && return + render("spree/api/errors/unauthorized", status: :unauthorized) && return end def error_during_processing(exception) - render text: { exception: exception.message }.to_json, - status: :unprocessable_entity && return + render(text: { exception: exception.message }.to_json, + status: :unprocessable_entity) && return end def requires_authentication? @@ -90,7 +90,7 @@ module Spree end def not_found - render "spree/api/errors/not_found", status: :not_foun && return + render("spree/api/errors/not_found", status: :not_found) && return end def current_ability diff --git a/app/controllers/spree/checkout_controller.rb b/app/controllers/spree/checkout_controller.rb index a01750072f..e05ad99535 100644 --- a/app/controllers/spree/checkout_controller.rb +++ b/app/controllers/spree/checkout_controller.rb @@ -29,7 +29,7 @@ module Spree def load_order @order = current_order - redirect_to main_app.cart_path && return unless @order + redirect_to(main_app.cart_path) && return unless @order if params[:state] redirect_to checkout_state_path(@order.state) if @order.can_go_to_state?(params[:state])