Fix order_url routes in a few places

This commit is contained in:
Luis Ramos
2021-01-23 14:21:17 +00:00
parent dd4ca8a8e6
commit 00fcb89af1
5 changed files with 7 additions and 7 deletions

View File

@@ -17,5 +17,5 @@
%h4= t(".other.title", count: orders.count)
%p= t(".other.explainer")
- orders.each_with_index do |order, i|
%a{ href: spree.order_url(order) }>= order.number
%a{ href: spree_order_url(order) }>= order.number
= ", " if i < orders.count - 1

View File

@@ -6,7 +6,7 @@
- if @order.user.present?
= t("email_so_edit_false_html",
orders_close_at: l(@order.order_cycle.orders_close_at, format: mail_long_datetime_format),
order_url: spree.order_url(@order))
order_url: spree_order_url(@order))
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
%p &nbsp;

View File

@@ -5,7 +5,7 @@
- if @order.user.present?
= t("email_so_edit_false_html",
orders_close_at: l(@order.order_cycle.orders_close_at, format: mail_long_datetime_format),
order_url: spree.order_url(@order))
order_url: spree_order_url(@order))
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
- if @order.errors.any?

View File

@@ -8,7 +8,7 @@
- allow_changes = !!@order.distributor.allow_order_changes?
= t("email_so_edit_#{allow_changes}_html",
orders_close_at: l(@order.order_cycle.orders_close_at, format: mail_long_datetime_format),
order_url: spree.order_url(@order))
order_url: spree_order_url(@order))
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
- else
= t("email_so_contact_distributor_to_change_order_html",

View File

@@ -47,7 +47,7 @@ describe SubscriptionMailer, type: :mailer do
end
describe "linking to order page" do
let(:order_link_href) { "href=\"#{spree.order_url(order)}\"" }
let(:order_link_href) { "href=\"#{spree_order_url(order)}\"" }
let(:order_link_style) { "style='[^']+'" }
let(:shop) { create(:enterprise, allow_order_changes: true) }
@@ -113,7 +113,7 @@ describe SubscriptionMailer, type: :mailer do
end
describe "linking to order page" do
let(:order_link_href) { "href=\"#{spree.order_url(order)}\"" }
let(:order_link_href) { "href=\"#{spree_order_url(order)}\"" }
let(:email) { SubscriptionMailer.deliveries.last }
let(:body) { email.body.encoded }
@@ -179,7 +179,7 @@ describe SubscriptionMailer, type: :mailer do
end
describe "linking to order page" do
let(:order_link_href) { "href=\"#{spree.order_url(order)}\"" }
let(:order_link_href) { "href=\"#{spree_order_url(order)}\"" }
let(:email) { SubscriptionMailer.deliveries.last }
let(:body) { email.body.encoded }