开发者

Rails Devise send password reset mail as delayed job

开发者 https://www.devze.com 2023-01-10 21:47 出处:网络
I want to set the rails plugin devise\'reset_password_instructions to delayed_job..but I tried many ways and failed.

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号