最新版本的Devise没有:默认情况下启用确认.我已经将相应的列添加到用户模型,但找不到任何如何启用的代码示例:确认.
我在哪里可以找到一个好的示例或启用它需要什么代码?
我的rspec测试给了我
NameError:
undefined local variable or method `confirmed_at' for #<User:0xca6ff98>
Run Code Online (Sandbox Code Playgroud)
我的用户规范是:
require 'spec_helper'
describe User do
before(:each) do
@user = Factory(:user)
end
# Factory will make sure that in the future if attributes are added the tests below don't break
# Just as long as the Factory is updated for the new attributes as appropriate.
context "email is null" do
it "record is invalid " do
@user.name = nil
@user.should_not be_valid
end
end
context "email is unique" do
it "record …Run Code Online (Sandbox Code Playgroud)