简体   繁体   中英

How to set root to devise sign_in

I have 3 separate devise_for:

  devise_for :admins
  devise_for :applicants, controllers: { registrations: 'registrations' }
  devise_for :parents

The following does not work for me:

devise_scope :user do
  root to: "devise/sessions#new"
end

I also tried:

devise_scope :applicants do
      root to: "devise/sessions#new"
    end

I want to set my root page to become the devise sign in for applicants. How do I go about this?

Thanks.

I solved it by adding removing the s in applicants.

devise_scope :applicant do
  root to: "devise/sessions#new"
end

Worked for me. Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM