TheConstructors/QwikStubs — pull request #1 by andrewberls (2013-02-07 07:53:13+00:00)
Title: Working with @jroesch to clean up login/user registration code

This is an attempt to extract away some of the boilerplate from the users controller. There's still a bit of manual password validation which I dislike, but apparently its tough to work with virtual attributes within MongoMapper so `validates_confirmation_of :password` is out as far as I can tell.

Added helper routes are `'/login' => 'sessions#new'` as `login_path` and `'logout' => 'sessions#destroy'` as `logout_path`

Additionally, I fixed some issues with session management - `sessions/create.html.erb` should not be a view (only a processing action) and so it's been removed. Finally, I added the missing else clause to catch invalid credentials.