Hi, I have a problem with the "uninitialized persistent DashboardController" when I open my site with localhost: 3000. This shows me the above error. it does not allow me to enter a user.
I have many models for the administrator as well as users, so I need a solution for this error.
y this is so .... and I define root: to => 'home / index' as my root file, so whenever I write localhost in my browser, it does not load.
I installed the program for the user and administrator Active-admin for the administrator.
// for devise user session controller :sessions do get 'login' => :new post 'login' => :create delete 'logout' => :destroy end root :to => 'home#activity_list' //for localroot
New question and its answer:
If you get this error then jus will do it.
Processing by Admin :: DashboardController # index as HTML Completed 401 Unauthorized in 1 ms
This occurs when you try to open localhost: 3000 / admin and redirect to localhost: 3000 / usres / sign_in
then you can add these three lines, so copy these three lines and paste them at the bottom of the file (after ActiveAdmin.setup do | config | .... end) in config / initializers / active_admin.rb.
ActiveAdmin::BaseController.class_eval do skip_before_filter :authenticate_user! end
I actually have
before_action: authenticate_user!
in my controller_ application.
Just open ActiveAdmin :: BaseController and put skip_before_filter here.
SSR
source share