2

这是我的用户模型:

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>

我该如何解决?

4

1 回答 1

3

设计不是问题,但我没有重新启动开发服务器。

于 2012-04-07T08:20:48.497 回答