Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAustin Klenk
4,399 PointsDevise Authentication
I am working on building a web app for my business and i am trying to style the devise layouts like the login & signup forms and no styles are being applied. I have bootstrap installed and working on other pages like the index home page except any of the devise forms.
1 Answer
Jesse Fisher
10,830 PointsBy default, the devise views are stored with the devise gem files.
To customize devise views, you will copy the files to your app/views folder.
Devise provides a generator to automate this:
rails generate devise:views
Run the above command, then you will be able to customize the views located in the new folder: app/views/devise/
For more info please see the Configuring Views section of the Devise readme:
https://github.com/plataformatec/devise#configuring-views
Let me know if you get stuck! Good luck.
Austin Klenk
4,399 PointsAustin Klenk
4,399 PointsI currently have app/views/admin & i tried deleted the admin views and added
config.scoped_views = true
to theconfig/initializers/devise.rb
file and then reran the views generator asrails generate devise:views admin
then i tried to edit the sessions new view and still not changingAustin Klenk
4,399 PointsAustin Klenk
4,399 PointsI figured it out, when i rendered the views as
rails generate devise:views admin
then setconfig.scoped_views = true
i tried to edit still didn't work then i renamed the folder fromadmins
toAdmins
then i tried to edit the form and it worked.