/sinatra_authentication

DBC challenge to set up user authentication

Primary LanguageRuby

DBC Challenge Friday October 18, 2013

http://socrates.devbootcamp.com/challenges/391

Start with Sinatra skeleton and add validation to user model including password length and appropriately formatted email.

Display appropriate error messages to the user for invalid data.

Add a field to store user access level (admin/student) and limit functionality to different user levels.

Notes: 

Handy active record tips:

rake console to get an active record console
y Users.first to display the first record in nice formatting
y Users.find(7) to display the 7th user

HTML5 validation is already implemented in lines like this one from sign_up.erb:

    <input type="email" name="user[email]" placeholder="e.g., me@example.com" >

The input type being email will pop up a small window requiring the user to enter an email if it doesn't pass email criteria