diff --git a/app/controllers/spree/orders_controller.rb b/app/controllers/spree/orders_controller.rb index ba2d873444..b519f3043f 100644 --- a/app/controllers/spree/orders_controller.rb +++ b/app/controllers/spree/orders_controller.rb @@ -95,7 +95,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 @@ -135,7 +135,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 @@ -188,7 +188,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/app/views/spree/orders/form/_update_buttons.html.haml b/app/views/spree/orders/form/_update_buttons.html.haml index 012bfc9171..884cea6746 100644 --- a/app/views/spree/orders/form/_update_buttons.html.haml +++ b/app/views/spree/orders/form/_update_buttons.html.haml @@ -12,7 +12,7 @@ - if order.changes_allowed? .columns.show-for-medium-up.medium-3   .columns.small-12.medium-3 - = link_to cancel_order_path(@order), method: :put, :class => "button secondary expand", "confirm-link-click" => t('orders_confirm_cancel') do + = link_to main_app.cancel_order_path(@order), method: :put, :class => "button secondary expand", "confirm-link-click" => t('orders_confirm_cancel') do %i.ofn-i_009-close = t(:cancel_order) .columns.small-12.medium-3 diff --git a/app/views/spree/shared/_order_details.html.haml b/app/views/spree/shared/_order_details.html.haml index 5735136d35..3368215cc5 100644 --- a/app/views/spree/shared/_order_details.html.haml +++ b/app/views/spree/shared/_order_details.html.haml @@ -41,7 +41,7 @@ = t(:orders_changeable_orders_alert_html, oc_close: l(order.order_cycle.orders_close_at, format: "%b %d, %Y %H:%M")) %a.close{ "ng-click" => "close()" } × - = form_for order, url: order_path(order), html: {id: 'update-order', name: 'update_order_form' } do |order_form| + = form_for order, url: main_app.order_path(order), html: {id: 'update-order', name: 'update_order_form' } do |order_form| - if order.changes_allowed? = render 'spree/orders/form', order_form: order_form -else diff --git a/spec/controllers/spree/orders_controller_spec.rb b/spec/controllers/spree/orders_controller_spec.rb index 2d08ae5fce..b1c561ce16 100644 --- a/spec/controllers/spree/orders_controller_spec.rb +++ b/spec/controllers/spree/orders_controller_spec.rb @@ -255,10 +255,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' diff --git a/spec/views/spree/admin/payment_methods/index.html.haml_spec.rb b/spec/views/spree/admin/payment_methods/index.html.haml_spec.rb index 2fb34ef37e..2a8d4bd991 100644 --- a/spec/views/spree/admin/payment_methods/index.html.haml_spec.rb +++ b/spec/views/spree/admin/payment_methods/index.html.haml_spec.rb @@ -8,9 +8,7 @@ describe "spree/admin/payment_methods/index.html.haml" do helper Spree::Admin::BaseHelper before do - controller.singleton_class.class_eval do - helper_method :new_object_url, :edit_object_url, :object_url - + ActionView::Base.class_eval do def new_object_url() "" end def edit_object_url(_object, _options = {}) "" end