3

我使用 devise (2.0.4) 来设置用户注册和登录功能。现在我想让用户在注册后能够登录。事件确认电子邮件发送到他的邮箱。只需标记“此用户未确认”即可。如何配置?

4

2 回答 2

3

我发现这也可以解决问题。选择哪一个?

def active_for_authentication?
  true
end
于 2012-04-18T08:27:50.510 回答
1

Try to add overrided method confirmation_required? directly to your User model:

class User < ActiveRecord::Base
  ...

  def confirmation_required?
    false
  end
end
于 2012-04-18T08:00:47.833 回答