I'm using devise for user auth, but I have nice mockups for the signup, login, etc. pages. I've already done the rails generate devise:views User
command and have all of the views in the views folder, however, when I replaced the registration/new.html.erb with my own new.html.erb, nothing changes nor looks different. It's as if I had done anything.
Anyone know what I'm doing wrong or at least how to successfully customize devise views
P.S. Is it important to note that I changed the route of devise/registration#new to /signup?
Our out-of-the box Devise setup is now working with Rails 7. Once again, if you'd like to refer to any of the code for this setup, or use the template wholesale for a new app, the code is available on GitHub, and you may also use it as a template repo to kick off your own Rails 7 devise projects.
at a glance answer.
rails generate devise:views User
rails generate devise:views
If you've already done it, move the folders devise created from app/views/User
to a new folder app/views/devise
(or just rename the User
folder to devise
, if that's an option.)
Those folders are:
app/views/User/confirmations app/views/User/mailer app/views/User/passwords app/views/User/registrations app/views/User/sessions app/views/User/shared app/views/User/unlocks
No other changes are necessary.
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