diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8540ba7096..fea9fd79b1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 diff --git a/app/controllers/spree/users_controller.rb b/app/controllers/spree/users_controller.rb index 41d48c71de..d6d13f0e48 100644 --- a/app/controllers/spree/users_controller.rb +++ b/app/controllers/spree/users_controller.rb @@ -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 diff --git a/app/mailers/spree/base_mailer_decorator.rb b/app/mailers/spree/base_mailer_decorator.rb index e84b36e33e..4c15268676 100644 --- a/app/mailers/spree/base_mailer_decorator.rb +++ b/app/mailers/spree/base_mailer_decorator.rb @@ -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 diff --git a/app/views/admin/enterprises/form/_primary_details.html.haml b/app/views/admin/enterprises/form/_primary_details.html.haml index 6dd9c8207f..30c582f8e2 100644 --- a/app/views/admin/enterprises/form/_primary_details.html.haml +++ b/app/views/admin/enterprises/form/_primary_details.html.haml @@ -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 diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml index 7653ab5676..8b3f1add2e 100644 --- a/app/views/layouts/mailer.html.haml +++ b/app/views/layouts/mailer.html.haml @@ -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] / | Unsubscribe %td diff --git a/app/views/shop/_blocked_cookies.html.haml b/app/views/shop/_blocked_cookies.html.haml index 6f273b4304..2b811dce0a 100644 --- a/app/views/shop/_blocked_cookies.html.haml +++ b/app/views/shop/_blocked_cookies.html.haml @@ -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') \ No newline at end of file diff --git a/app/views/spree/user_mailer/signup_confirmation.html.haml b/app/views/spree/user_mailer/signup_confirmation.html.haml index d9c8da05e1..10cd5a64b7 100644 --- a/app/views/spree/user_mailer/signup_confirmation.html.haml +++ b/app/views/spree/user_mailer/signup_confirmation.html.haml @@ -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   %hr/ %p