Skill Level: Intermediate
Time Limit: 1-2 hours
There are a number of authentication solutions that offer quick and somewhat painless user management with features such as encryption, email confirmation, and password reset. The object of this drill is to learn and use some of the underlying methods Rails provides to manage session, cookies & encryption.
User model and migration to handle both regular users and at least one administrator. Your controllers should support a few core actions:
- Use Haml & SASS
- Logging in
- Logging out
- Creating an account
- Viewing the secret dashboard page for logged in users
- Viewing a secret page for administrators
- Redirecting a user back to the "log in" screen if they try to view the secret page without being logged in
- Redirecting a regular user back to their "dashboard" screen or prompting them with a
flashmessage if they try to view the administrator page
NOTE: Don't worry about populating your views with too much data just get down the basic functionality.