Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法暂时禁用注册以允许几个用户注册和测试应用程序?
在您的用户模型中,有如下内容:
class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
只需从列表中删除 :registerable