回答編集履歴
1
confirmableについて追記
answer
CHANGED
@@ -12,4 +12,25 @@
|
|
12
12
|
`send_reset_password_instructions`
|
13
13
|
というメソッドかと思います。
|
14
14
|
|
15
|
-
チェックのトリガーは、cronなどでの定期実行にするか、ActiveJobなどを用いて、3日+α後にチェックするなど、お好みで。
|
15
|
+
チェックのトリガーは、cronなどでの定期実行にするか、ActiveJobなどを用いて、3日+α後にチェックするなど、お好みで。
|
16
|
+
|
17
|
+
---
|
18
|
+
|
19
|
+
confirmableの方の話だったのですね。
|
20
|
+
失礼しました。
|
21
|
+
|
22
|
+
であれば、こちらのほうのファイルではないかと。
|
23
|
+
[confirmable.rb](https://github.com/plataformatec/devise/blob/master/lib/devise/models/confirmable.rb)
|
24
|
+
|
25
|
+
confirmation_sent_at : 送信された日時
|
26
|
+
unconfirmed_email : 確認中のメールアドレス
|
27
|
+
|
28
|
+
になるので、
|
29
|
+
unconfirmed_emailがNOT NULLで、confirmation_sent_at が3日以上前のものを探せばよさそうです。
|
30
|
+
メッセージ再送信は、`resend_confirmation_instructions` という専用のメソッドが用意されているようですね。
|
31
|
+
|
32
|
+
[mailer.rb](https://github.com/plataformatec/devise/blob/master/app/mailers/devise/mailer.rb)
|
33
|
+
の
|
34
|
+
confirmation_instructions
|
35
|
+
のrecordは、[Devise::RegistrationsController](https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb#L19) で作成されているのではないかと思います。
|
36
|
+
tokenは、[ここ](https://github.com/plataformatec/devise/blob/master/lib/devise/models/confirmable.rb#L49)でしょうか。
|