I have two different kinds of users in my system. Trying to setup two different sets of devise pages / controllers for them.
I can understand how this can be done when there are multiple models. But wondering how this can be done with the same model?
eg.
/seller/sign_in
and
/buyer/sign_in
Use device_scope to change default route
****Assuming you have user device model
devise_scope :user do
get "/seller/sign_in", to: 'devise/sessions#new'
get "/buyer/sign_in", to: 'devise/sessions#new'
end
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.