Devise is a sweet gem that provides authentication for a Rails application.
One of the things that I couldn’t figure out when I first started using Devise, is where the various views that Devise rendered came from. Going to the
app/views folder didn’t reveal anything obvious.
It turns out according to the gem documentation, that Devise packages all of its views inside the gem itself. Meaning by default you can’t make changes to the views that Devise renders.
Turns out you can get Devise to dump and use the view files locally within your Rails app. To do that you’ll want to run this command from the command-line from within your application project folder:
$ rails generate devise:views
Running the command above will now create a subfolder called
devise within your
app/views folder. Now you can tweak the look and feel of the login and registration views.