Browse Source

Fixed error in user_mailer

development
Godwin 9 years ago
parent
commit
7e3163c0d0
  1. 6
      app/mailers/user_mailer.rb
  2. 1
      config/initializers/delayed_job_config.rb

6
app/mailers/user_mailer.rb

@ -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

1
config/initializers/delayed_job_config.rb

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