diff --git a/.env.development b/.env.development index 7bfca5b898..96ce0467c8 100644 --- a/.env.development +++ b/.env.development @@ -18,7 +18,7 @@ OFN_REDIS_URL="redis://localhost:6379/1" OFN_REDIS_JOBS_URL="redis://localhost:6379/2" OFN_REDIS_CABLE_URL="redis://localhost:6379/0" -SITE_URL="0.0.0.0:3000" +SITE_URL="localhost:3000" # Deactivate rack-timeout in development. # https://github.com/zombocom/rack-timeout#configuring diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 00a6a7dc6c..d5cc7a3c3c 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -18,6 +18,7 @@ class ApplicationMailer < ActionMailer::Base def roadie_options # This lets us specify assets using relative paths in email templates - super.merge(url_options: { host: URI(main_app.root_url).host }) + url = URI(main_app.root_url) + super.merge(url_options: { host: url.host, port: url.port }) end end diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml index 12c654b3d1..f12aad1928 100644 --- a/app/views/layouts/mailer.html.haml +++ b/app/views/layouts/mailer.html.haml @@ -16,7 +16,7 @@ %table{:bgcolor => "#f2f2f2"} %tr %td - %img{src: ContentConfig.url_for(:footer_logo), width: "144", height: "50"}/ + = image_tag ContentConfig.url_for(:footer_logo), width: "144", height: "50" %td{:align => "right"} %h6.collapse = Spree::Config[:site_name] diff --git a/config/environments/development.rb b/config/environments/development.rb index 3dcbe29076..f5b71d0e1c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -69,8 +69,7 @@ Openfoodnetwork::Application.configure do # Show emails using Letter Opener config.action_mailer.delivery_method = :letter_opener - config.action_mailer.default_url_options = { host: "0.0.0.0:3000" } - config.action_mailer.asset_host = "http://localhost:3000" + config.action_mailer.default_url_options = { host: "localhost:3000" } config.log_level = ENV.fetch("DEV_LOG_LEVEL", :debug) end