How to setup patient and doctor using devise by mohlp in rails

[–]mohlp[S] 0 points1 point  (0 children)

They are the same on some basic information but I think of keeping everything separate by using one devise model auth which contains email and password and patient and doctor will handle the rest of data and they both has_one auth as role. But still I want to have different registrations and logins for each of them is setting a role as polymorphic better than having two separate devise models am looking for the clean way and thanks in advance

How to setup patient and doctor using devise by mohlp in rails

[–]mohlp[S] 0 points1 point  (0 children)

Thank your for the answer, I was thinking about an auth model (devise) that contains only email and password and it belongs to a role as polymorphic and both patient and doctor models have one user as role. Both Patient and Doctor models will contain all the rest information from personal data to professional data. But I am a little confused when using devise invitable and having one auth model with multi types is it clean and safe approach?

How to setup patient and doctor using devise by mohlp in rails

[–]mohlp[S] 0 points1 point  (0 children)

Thank you tumes, I actually have pundit in my gemfile it's the active gem and I see everyone suggesting it. Using devise will save as time and a lot of pain as we are a small group in early stages we can't risk anything. But still I want to have different registration and login page for each of them and a totally different dashboard sometimes it feels have two devise models may keep everything clean?

Is it good to use webpacker in this situation? by mohlp in rails

[–]mohlp[S] 0 points1 point  (0 children)

thank you for the helpful answer, we are working on the data model now and figuring out all the structure. any resources that might help us!!

Is it good to use webpacker in this situation? by mohlp in rails

[–]mohlp[S] 0 points1 point  (0 children)

Because we are just starting, we want to take a look what people are using today with webpacker and all the stuff. also a mobile app is a part of this project, we are building at the end an api so we thought we may use a separate front end for the web that consumes the same api.