I want to set the rails plugin devise'reset_password_instructions to delayed_job..but I tried many ways and failed.
I found a function password_controller#creat :
self.resource = resource_class.send_rese开发者_开发问答t_password_instructions(params[resource_name])
I think the sentence used for send email to reset password.
I want to alter it like :
self.resource = Delayed::Job.enqueue ApplicationController::MailingJob.new(:resource_class.send_reset_password_instructions, params[resource_name])
OK, it will return Syntax error...
Help me.. I don't know how to solve it.. thx.
I use the delayed_job_mailer plugin to accomplish this.
on console:
Devise::Mailer.delay.confirmation_instructions(self.resource)
精彩评论