I have a User and a Rep model
devise_for :users, :controllers => {:registrations => 'user_registration'}
devise_for :reps
I ran
rails generate devise:views reps
The custom views show up in app/views/reps
But the rep paths are still using the built in devise views
Rendered ~/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.9/app/views/devise/registrations/edit.html.erb
Instead of the generated reps views.
I had the same problem. I eventually spotted this in the documentation.
If you have more than one role in your application (such as “User” and “Admin”), you will notice that Devise uses the same views for all roles. Fortunately, Devise offers an easy way to customize views. All you need to do is set “config.scoped_views = true” inside “config/initializers/devise.rb”.
So I switched the config.scoped_views to true and it worked a charm :)
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