1

我在我的應用程序中使用設計進行身份驗證。當用戶註冊確認電子郵件發送給用戶說,修改設計郵件

Welcome [email protected] ! 

You can confirm your account email through the link below: 

Confirm my account 

但我想顯示用戶的名稱,而不是電子郵件。我怎樣才能實現這個?請幫忙。我和我一起設計視角。但它使用一個@email實例變量來顯示電子郵件。它在哪裏定義?幫助將不勝感激。

<p>Welcome <%= @email %>!</p> 

<p>You can confirm your account email through the link below:</p> 

<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p> 
+0

它不是這個問題的重複,我已經設計出在我的應用程序視圖。 – RSB

+0

然後編輯它... – apneadiving

+0

已經完成... – RSB

回答

4

@resource很可能是您的用戶。

所以更換@email(中色器件郵件定義)與@resource.name(或任何你使用獲得的名稱)

+0

謝謝@apneadiving – RSB