相关疑难解决方法(0)

如何启用:在Devise中确认?

最新版本的Devise没有:默认情况下启用确认.我已经将相应的列添加到用户模型,但找不到任何如何启用的代码示例:确认.

我在哪里可以找到一个好的示例或启用它需要什么代码?

confirmation devise ruby-on-rails-3

41
推荐指数
4
解决办法
3万
查看次数

rspec用户测试给出"未定义的局部变量或方法`confirmed_at'"

我的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)

ruby rspec ruby-on-rails devise rspec2

5
推荐指数
1
解决办法
4305
查看次数