TheConstructors / QwikStubs

An online ticket selling and purchasing system that is designed to be easy and convenient to use by both sellers and purchasers.
http://qwikstubs.com/
3 stars 0 forks source link

Working with @jroesch to clean up login/user registration code #1

Closed andrewberls closed 11 years ago

andrewberls commented 11 years ago

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.

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.

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

ColinDKelley commented 11 years ago

I'm going to accept this pull request so I can make my branch on top of it.