Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Active admin change default model admin_user

I'm starting my first project with Active Admin. To use another model for my users I use the following command :

rails generate active_admin:install User

After this I make this change in active_admin initializer :

config.authentication_method = :authenticate_user!
config.current_user_method = :current_user

I'm correctly login my application but on the home page I get this error :

undefined method `destroy_admin_user_session_path' for #<ActiveAdmin::Views::HeaderRenderer:0x007ff8fa086a60>

How can I fix it properly ?

like image 224
Awea Avatar asked Dec 21 '22 02:12

Awea


1 Answers

Solved by editing initializer :

config.logout_link_path = :destroy_user_session_path
like image 187
Awea Avatar answered Jan 05 '23 12:01

Awea