升级到rails 4后,
我有问题resource.pending_reconfirmation?
在注册#edit view中我有:
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
%div
Currently waiting confirmation for: #{resource.unconfirmed_email}.
%br
Please click the link in the email to confirm
.ruler
似乎是devise_mapping.confirmable? == true但是在电子邮件更改资源后才正确.pending_reconfirmation?保持虚假。
为什么会发生这种情况以及如何解决?
答案 0 :(得分:1)
如果发现resource.pending_reconfirmation存在问题?以及试图使用的字段。我用这个来证明这一点:
- if devise_mapping.confirmable? && (not resource.confirmed?)
%div
Currently waiting confirmation for: #{resource.email}.
%br
Please click the link in the email to confirm
.ruler