0
我试图在使用设计和导轨时确认用户帐户处于测试模式。这是场景。我更改了发送到用户成功注册后呈现的部分内容的设计确认电子邮件。问题是它显示以下错误“未定义的方法电子邮件”。这是我的确认部分。 如何让用户通过设计确认电子邮件链接本地激活帐户
。以下是我的application_helper为了访问资源的详细信息。Welcome <%= @resource.email %>!
You can confirm your account through the link below:
<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>
def resource_name
:user
end
def resource
@resource ||= User.new
end
def devise_mapping
@devise_mapping ||= Devise.mappings[:user]
end</pre>
是的。或者我猜是因为我的模型被称为用户。 – 2012-02-07 08:31:12
你可以检查(调试,或者我猜'throw @ resource')。 – 2012-02-07 08:36:03
如果您不介意请详细说明。 – 2012-02-07 08:44:52