[英]devise skip_confirmation! is still sending email
I am using devise and I want to skip confirmation email. Despite, I am using skip_confirmation.我正在使用 devise,我想跳过确认 email。尽管如此,我正在使用 skip_confirmation。 before user,save.
在用户之前,保存。 it is still sending email. This is really maddening as I have tried so many ways but skip_confirmation!
它仍然在发送 email。这真的很令人抓狂,因为我已经尝试了很多方法,但是跳过了确认! is not working at all.
根本不工作。
u = User.new(:email => "abc@example.com", :password => "12345678")
u.skip_confirmation!
u.save
The code shown above worked for me, but I was having the same problems when I was using the User.create() method:上面显示的代码对我有用,但我在使用 User.create() 方法时遇到了同样的问题:
u = User.create(:email => "abc@example.com", :password => "12345678")
u.skip_confirmation!
u.save
User.create()
automatically sends the emails before the skip_confirmation!
User.create()
在skip_confirmation!
can work.能行得通。 Make sure to use
User.new()
.确保使用
User.new()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.