Locked lesson.
About this lesson
Using Bootstrap to customize Devise views.
Exercise files
Download this lesson’s related exercise files.
Customizing Devise Views.docx58.7 KB Customizing Devise Views - Solution.docx
58.7 KB
Quick reference
Customizing Devise Views
Customizing and styling Devise views is pretty easy.
When to use
Devise views are pretty bland right out of the box. But we can customize them by modifying the files in our app/views/devise folder.
Instructions
Add these two links to your navbar:
<li><%= link_to "Sign Up", new_user_registration_path %></li>
<li><%= link_to "Login", new_user_session_path %> </li>
Next: Modify the Devise form pages using Bootstrap Panels.
Next: Modify the Devise form pages using Bootstrap Forms.
- update all the form div class="field" divs to div class="form-group"
- add class: "form-control" to all the input fields
- add bootstrap class: btn btn-primary code to the form button
Be sure to make these changes on all the Devise form pages you'll be using.
Hints & tips
- Add links to your Navbar to allow users to sign up and login to your site
- Go through all the devise pages and customize them with Bootstrap panel and form code
- Change all your form divs to "form-group" and not "field"
- Add a class of "form-control" to all your form input fields
- Use a class of "btn btn-primary" on all your form buttons
Lesson notes are only available for subscribers.