Rails Devise: after_confirmation

后端 未结 8 1586
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 13:31

Is there a way to create a after_confirmation :do_something ?

The goal is to send an e-mail after the user confirms using Devise :confirmable

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-05 13:46

    I don't see that callback too, maybe you can try to override the confirmation method and call your callback there.

    def send_confirmation_instructions(attributes={})
      super(attributes)
      your_method_here
    end
    

提交回复
热议问题