how to create devise controller code example
Example 1: devise generate controller
$ rails generate devise:controllers users # `/controllers/users/`
# routes.rb
devise_for :users, controllers: { registrations: 'users/registrations' }
Example 2: edit devise controllers
# in terminal
rails g devise:controllers users # generate all controllers
# routes.rb
devise_for :users, controllers: { registrations: 'users/registrations' }
#the registration will be done in the RegistrationsController