Day 37: Rails Continued

By May Miller-Ricci (Coding Dojo’s October 7th, 2013 Class)

I guess the day count is weird – just days of actual class in the 9 weeks.  It’s been so many more days than that.  Anyway, I’m still going with Rails…  It’s definitely starting to come together.  After much struggling…  I’m currently working on building user registration and login.  Again.  I think this is the 3rd time?  First with straight PHP and for “the wall”, then again with CodeIgniter, and now with Rails.  Interesting to do the same task different ways and compare.  Each has its own methods of validation, password encryption, error messages, etc.  At this point, the whole login validation thing is old hat.

  1. Check if the username (or email address) field on the login form is blank and if so display an error message saying so.
  2. Otherwise, check if the username exists in the database and if not display an error message saying so.
  3. Otherwise, if the username exists in the database check if the password matches and if not display an error message saying so.
  4. Otherwise if the username and password match then all is well and log the user in!

Whee.  Wanna see what that looks like?  It occurs to me that I’ve never posted any actual code on this blog.  Here!:


Read May’s full blog post here.


dojo guide

Looking for a Career in Web Development?

Read our quick-start guide to becoming a Developer

  • Includes exclusive insight from a seasoned Web Developer
  • Uncovers the top career misconceptions holding you back
  • Highlights the must-have qualities all employers require
  • 89,615 downloads to date

Leave a Reply

Your email address will not be published. Required fields are marked *