2013-10-30 40 views
1

工作升級到導軌4, 後,我有更改電子郵件resource.pending_reconfirmation?不再與軌道4

resource.pending_reconfirmation? 

問題在註冊#編輯觀點我有:

- 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,但在電子郵件更改resource.pending_reconfirmation後?保持虛假。

爲什麼會發生這種情況以及如何解決?

回答

0

如果發現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