From b1896733ca4d3083803f18c6384dc4b65670c230 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Fri, 14 May 2021 00:08:07 +0100 Subject: [PATCH] Fix routes --- app/controllers/spree/orders_controller.rb | 6 +++--- spec/controllers/spree/orders_controller_spec.rb | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/controllers/spree/orders_controller.rb b/app/controllers/spree/orders_controller.rb index 51bacbb588..b204fffdb5 100644 --- a/app/controllers/spree/orders_controller.rb +++ b/app/controllers/spree/orders_controller.rb @@ -101,7 +101,7 @@ module Spree @order.next_transition.run_callbacks if @order.cart? redirect_to main_app.checkout_state_path(@order.checkout_steps.first) elsif @order.complete? - redirect_to order_path(@order) + redirect_to main_app.order_path(@order) else redirect_to main_app.cart_path end @@ -157,7 +157,7 @@ module Spree else flash[:error] = I18n.t(:orders_could_not_cancel) end - redirect_to request.referer || order_path(@order) + redirect_to request.referer || main_app.order_path(@order) end private @@ -197,7 +197,7 @@ module Spree if items.empty? flash[:error] = I18n.t(:orders_cannot_remove_the_final_item) - redirect_to order_path(order_to_update) + redirect_to main_app.order_path(order_to_update) end end diff --git a/spec/controllers/spree/orders_controller_spec.rb b/spec/controllers/spree/orders_controller_spec.rb index 412b706cf5..155eba8654 100644 --- a/spec/controllers/spree/orders_controller_spec.rb +++ b/spec/controllers/spree/orders_controller_spec.rb @@ -225,10 +225,6 @@ describe Spree::OrdersController, type: :controller do describe "the page" do render_views - it "provides the right registration path" do - expect(subject.registration_path).to eq registration_path - end - it "shows the right registration link" do # We fixed our view by hardcoding the link. spree_registration_path = '/signup'