I\'m running Rails 5.1.2 and Ruby 2.4.0.
I\'ve created a method in the ApplicationController called require_login
that checks if the user is logged in order
resources :users
and devise_for :users
are conflict so
try below code:
Rails.application.routes.draw do
root to: 'visitors#index'
devise_for :users
#resources :users //comment the users resources because its already used by devise_for or used some other resources for users
get "home/index"
get "home/minor"
root to: 'home#index'
end
Additionally, in your config/initalizer/devise.rb
file
Change config.sign_out_via = :delete
to config.sign_out_via = :get