Replace spree_order_url with order_url so we can use scope in the routes file

This commit is contained in:
Luis Ramos
2021-01-25 19:56:25 +00:00
parent f3da7afd55
commit 34ae3ca24d
5 changed files with 8 additions and 8 deletions

View File

@@ -6,7 +6,7 @@
- separator = messages.values.any? ? ": " : ", "
- orders.each_with_index do |order, i|
%a{ href: spree_order_url(order) }>= order.number
%a{ href: order_url(order) }>= order.number
= separator if messages.values.any? || i < orders.count - 1
- if messages.values.any?
= messages[order.id] || t(".no_message_provided")
@@ -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: 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: 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: 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: 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=\"#{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=\"#{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=\"#{order_url(order)}\"" }
let(:email) { SubscriptionMailer.deliveries.last }
let(:body) { email.body.encoded }