snowstorm/web — pull request #3 by jimjh (2013-02-06 13:39:21+00:00)
Title: User account creation and authentication.

Using [devise][1] for user management. The following models are available:

- `Student`
- `Instructor`
- `Admin`

and all of them inherit from the `User` model and share the same table. To create an instructor, either use

```ruby
Instructor.new first_name: 'Jim', last_name: 'Lim', email: '...', password: '...'
```

or

```ruby
User.new first_name: 'Jim', last_name: 'Lim', role: 'Instructor', email: '...', password: '...'
```

To set up a controller with user authentication, add the following line at the top

```ruby
before_filter :authenticate_user!
```

The following modules have been setup: Database Authenticable, Confirmable, Recoverable, Registerable, Rememberable, Trackable, Validatable, and Lockable. Details are on the devise GitHub repo. Confirmable, Lockable, and Recoverable will be enabled once we decide on how to use email.

[1]: https://github.com/plataformatec/devise