1
In my project I am using the Rails 5.1.1 and the Devise for login. My question is how I can make a View ,so that the Devise uses as layout, without being the application.html.erb
?
1
In my project I am using the Rails 5.1.1 and the Devise for login. My question is how I can make a View ,so that the Devise uses as layout, without being the application.html.erb
?
2
I found the solution:
config.to_prepare do
Devise::SessionsController.layout "your_layout_name"
Devise::RegistrationsController.layout "your_layout_name"
Devise::ConfirmationsController.layout "your_layout_name"
Devise::UnlocksController.layout "your_layout_name"
Devise::PasswordsController.layout "your_layout_name"
end
0
Create an app/views/layouts/Devise.html.erb file and it will already be used as a layout for the views of the controller.
0
Can also be done:
rails g devise:views user
And for controllers
rails g devise:controllers user
on the routes gets:
sessions: 'users/sessions',
registrations: 'users/registrations'
Remembering that 'user' is the model that is managed by Developer in your project
Browser other questions tagged ruby-on-rails rails4 devise
You are not signed in. Login or sign up in order to post.
You generated custom Devise views?
– Luiz Carvalho