Last Updated: February 25, 2016
·
1.423K
· irichlau

Devise Gem Multiple Role View Editing

When you want to create multiple login role views in devise and you run this for example.

rails g devise:views admin
rails g devise:views user

this generates seperate signup/signin views for the admin and user. IF you want to edit the specific forms you will find that the changes do not appear when you save and refresh the page.

The solution to this is that you need to go into your config/initializers folder

Open the devise.rb

and uncomment line 181

config.scoped_views = false 

and change it to

config.scoped_views = true

if you go back to your forms your changes should show in your browser.