I have two models using Devise and I want the views to be different from one another. However, it only has one new.html.erb view, etc.
How can I have separate views for each model?
thanks
If i am reading you correctly, assuming that you created a User
model and, say, a Admin
model, you'll want to do what is known as set devise up for Scoped Views.
You can generate the views for each model by calling rails generate devise:views users
.
Then set config.scoped_views = true
inside "config/initializers/devise.rb".
All of this is in the README as an fyi.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With