jeudi 14 juillet 2016

Resque mailer undefined method for Hash on production

i'm trying to setup resque mailer on production but on Queues still failing and showing this undefined method for Hash.

Please someone have a idea how to fix it?

undefined method `email' for #<Hash:0x007fcfaeb88280>

my mailer confing

config.action_mailer.default_url_options = { host: 'localhost' }

  ActionMailer::Base.smtp_settings = {
    address: 'smtp.gmail.com',
    port: '587',
    domain: 'xxxx.com',
    authentication: :plain,
    user_name: 'xxxx@gmail.com',
    password: 'xxxx',
    enable_starttls_auto: true
  }
end

resque initializer
require "resque/tasks"

task "resque:setup" => :environment

mailer

class UserMailer < ActionMailer::Base
  default from: 'xxx'
  include Resque::Mailer


  def registration_confirmation(user)
    @user = user
    mail to: user.email, subject: 'Confirm registration', &:html
  end

Aucun commentaire:

Enregistrer un commentaire