The actual code is used here:
#app/controllers/application_controller.rb Class ApplicationController < ActionController::Base
The problem you probably have twice:
-
Make sure your other controllers inherit from application_controller :
-
You somehow miss the before_action
If you use skip_before_action anywhere, you need to remove it. This will probably cause a problem with your authenticate_user! method authenticate_user! . To fix this, I would first test without any skip_before_action , and then see what works correctly.
A further note is that signin / signup does not matter. They all inherit from Devise controllers; they will be launched as needed.
source share