"", :null =-6ren">
gpt4 book ai didi

ruby-on-rails-3 - 尝试从收到的电子邮件中单击确认帐户时设计 unconfirmed_email

转载 作者:行者123 更新时间:2023-12-04 05:52:21 24 4
gpt4 key购买 nike

这是我的用户模型:

class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable,:confirmable

# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me

end

这是schema.rb:
 create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "profile_id"
t.string "profile_type"
end

在我的初始值设定项 devise.rb 中,我设置了以下内容:
config.reconfirmable = false

我收到一封邮件,告诉我点击确认我的帐户,当我这样做时,我收到此错误:
NameError in Devise::ConfirmationsController#show

undefined local variable or method `unconfirmed_email' for #<User:0xaa53818>

我该如何解决?

最佳答案

Devise 没有问题,但我没有重新启动开发服务器。

关于ruby-on-rails-3 - 尝试从收到的电子邮件中单击确认帐户时设计 unconfirmed_email,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9928003/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com