Prefix all calls to root_url with main_app

This commit is contained in:
luisramos0
2019-12-26 15:52:30 +00:00
parent a8a6fce385
commit 55bb328d48
7 changed files with 10 additions and 10 deletions

View File

@@ -95,7 +95,7 @@ class ApplicationController < ActionController::Base
current_order.empty!
current_order.set_distribution! nil, nil
flash[:info] = "The hub you have selected is temporarily closed for orders. Please try again later."
redirect_to root_url
redirect_to main_app.root_url
end
end
@@ -105,7 +105,7 @@ class ApplicationController < ActionController::Base
current_order.empty!
current_order.set_order_cycle! nil
flash[:info] = "The order cycle you've selected has just closed. Please try again!"
redirect_to root_url
redirect_to main_app.root_url
end
end

View File

@@ -32,7 +32,7 @@ module Spree
session[:guest_token] = nil
end
redirect_back_or_default(root_url)
redirect_back_or_default(main_app.root_url)
else
render :new
end

View File

@@ -9,6 +9,6 @@ Spree::BaseMailer.class_eval do
def roadie_options
# This lets us specify assets using relative paths in email templates
super.merge(url_options: { host: URI(spree.root_url).host })
super.merge(url_options: { host: URI(main_app.root_url).host })
end
end

View File

@@ -54,7 +54,7 @@
.row{ ng: { show: "Enterprise.sells == 'own' || Enterprise.sells == 'any'" } }
.three.columns.alpha
= f.label :permalink, t('.permalink')
%div{'ofn-with-tip' => t('.permalink_tip', link: spree.root_url)}
%div{'ofn-with-tip' => t('.permalink_tip', link: main_app.root_url)}
%a= t('admin.whats_this')
.six.columns
= f.text_field :permalink, { 'ng-model' => "Enterprise.permalink", placeholder: "eg. your-shop-name", 'ng-model-options' => "{ updateOn: 'default blur', debounce: {'default': 300, 'blur': 0} }" }
@@ -69,7 +69,7 @@
%div{'ofn-with-tip' => t('.link_to_front_tip')}
%a= t('admin.whats_this')
.eight.columns.omega
= surround spree.root_url, "/shop" do
= surround main_app.root_url, "/shop" do
{{Enterprise.permalink}}
.row
.three.columns.alpha

View File

@@ -42,10 +42,10 @@
%tr
%td{:align => "center"}
%p
%a{:href => "#{ URI.join(spree.root_url, Spree::Config.footer_tos_url).to_s }", :target => "_blank"}
%a{:href => "#{ URI.join(main_app.root_url, Spree::Config.footer_tos_url).to_s }", :target => "_blank"}
= t :terms_of_service
|
%a{:href => "#{ spree.root_url }"}
%a{:href => "#{ main_app.root_url }"}
= Spree::Config[:site_name]
/ | <a href="#"><unsubscribe>Unsubscribe</unsubscribe></a>
%td

View File

@@ -9,6 +9,6 @@
.alert-box.blocked-cookies.hidden
%p= t('blocked_cookies_alert')
%a.button.allow{target: '_blank', href: "#{spree.root_url}embedded_shopfront/shopfront_session/"}
%a.button.allow{target: '_blank', href: "#{main_app.root_url}embedded_shopfront/shopfront_session/"}
= t('allow_cookies')

View File

@@ -9,7 +9,7 @@
= t :email_signup_confirmed_email
%p
-# Remove http:// and trailing slashes from root url if they exist
= t :email_signup_shop_html, link: link_to(spree.root_url.sub(/http:\/\//,"").sub(/\/$/,""), spree.root_url, target: '_blank')
= t :email_signup_shop_html, link: link_to(main_app.root_url.sub(/http:\/\//,"").sub(/\/$/,""), main_app.root_url, target: '_blank')
%p &nbsp;
%hr/
%p &nbsp;