Rails

Sorry if this is a stupid question. But if I set up the program, it would seem to completely remove the ability to enter the system. I could easily delete the accounts, but what else. Should I add something like devise_for: user ,: except => register or what? The reason I am doing this is because I want the database to be downloaded only by users.

+7
source share
2 answers

You are almost right:

devise_for :users, :skip => :registrations 

Documentation

+8
source

You should have something like this on your models:

 class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable end 

To remove registration, you must delete the registered module so that the module is as follows:

 class User < ActiveRecord::Base devise :database_authenticatable, :recoverable, :confirmable, :rememberable, :trackable, :validatable end 
+3
source

All Articles