Active Admin authentication conflicting with User authentication

后端 未结 4 1364
你的背包
你的背包 2021-01-02 03:07

Active Admin is a gem used for having an admin dashboard in your application. It uses Devise for logging in users and creates a separate admin_user model for th

4条回答
  •  情深已故
    2021-01-02 03:47

    I am not sure, but you can try something like

    root :to => proc { |env| [ 302, {'Location'=> env["warden"].authenticate? ? "users/dashboard" : "/home" }, [] ] }
    

提交回复
热议问题