How to configure ActiveAdmin routes to get 2 signin pages (for a user and for an admin) with 1 User model?

后端 未结 1 1758
清酒与你
清酒与你 2021-02-11 09:32

My project had 2 models: AdminUser and User.

I\'d removed the AdminUser model (and db tables associated) and now I\'m

1条回答
  •  悲哀的现实
    2021-02-11 10:17

    Since you skip generating new user model, replace any admin_user string in the generated stuff from ActiveAdmin to user. So instead of :authenticate_admin_user! replace it with :authenticate_user! and so on in migration files: instead of admin_user_id put user_id same for admin_user_type ... etc!

    0 讨论(0)
提交回复
热议问题