Fixed error in user_mailer

This commit is contained in:
Godwin 2016-06-07 21:06:02 -07:00
parent 5c11c6147e
commit 7e3163c0d0
2 changed files with 4 additions and 3 deletions

View File

@ -171,11 +171,11 @@ class UserMailer < ActionMailer::Base
end
private
def set_host
def set_host(*args)
if Rails.env.production?
@host = "https://#{I18n.location.to_s}.bikebike.org"
@host = "https://#{I18n.locale.to_s}.bikebike.org"
elsif Rails.env.preview?
@host = "https://preview-#{I18n.location.to_s}.bikebike.org"
@host = "https://preview-#{I18n.locale.to_s}.bikebike.org"
else
@host = UserMailer.default_url_options[:host]
end

View File

@ -0,0 +1 @@
Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log'))