I am using devise
one app rails
for session management, and I wanted to know if I could change the layout
one in which the forms are displayed since it uses application.html.erb
.
I've been looking through the rails documentation where it explains how to define a specific layout in a controller but I don't have access to the controller devise
in my app folder.
The simplest solution is to create a
layout
calldevise.html.erb
in the directory/app/views/layouts/
, and rails will take thatlayout
to apply to the devise views.In other words, create a file:
And place the
layout
where you want to apply to viewsdevise
.Devise has a generator just for this.
View
$ rails generate devise:views
Builder: Controller Builder:
$ rails generate devise:controllers [scope]
You can see more details here: https://github.com/plataformatec/devise#configuring-views