4
我试图用色器件恢复用户的密码,但它会生成以下错误如何恢复密码与设计(Ruby on Rails的)
undefined method `reset_password_sent_at=' for #<User:0x007fb78cfafb68>
谁能帮助我,因为我m新的Ruby on Rails?
什么是恢复密码和使用Devise给用户发送电子邮件的最佳方式?非常感谢您......
我用色器件(2.2.3)
User.rb
require 'digest/md5'
class User < ActiveRecord::Base
# Setup accessible (or protected) attributes for your model
belongs_to :shop
before_create :compute_email_md5
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable,
:recoverable,
:rememberable,
:trackable,
:validatable,
:token_authenticatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email,
:email_md5,
:password,
:password_confirmation,
:shop_id,
:role,
:terms,
:name,
:notify_on_order_received
validates :terms, :acceptance => true, :on => :create
end
的解决方案是 reset_password_sent_at列到用户表
版本的设计?你能显示一些代码吗? – Nobita 2013-02-19 16:29:49
好的我'使用设计2.2.3 – 2013-02-19 16:36:42
请显示你正在使用设计的模型。 – Nobita 2013-02-19 16:41:05