Controllers, continued (Tue Oct 10, lecture 16)

Homework due for today

Legend: : Participation | : Early | : PDF | : Portfolio | : Zipped

  1. PR Meetings: All teams organize the next PR meeting with your PR. You have to coordinate with the other team who has the same PR to make it be on the same day. Schedule the meeting during the week of March 6 to March 10. Using the lab time on March 8 is a really good choice, because it’s already on your schedules and we have a room. However you may work out a different time with your PR.

  2. RORT: Read Ruby on Rails Tutorial ([RORT]) Chapter 6, “Modeling Users”. Another major step forward, and yes, this is a meaty chapter again. You will learn A LOT! How to create a User model (you kind of know that alreaedy) but more than that, we will learn about ActiveRecord validations and most importantly start thinking about authentication! As the book suggests, don’t use a canned authentication gem (yet) because they are often more work than work savers.

    As usual I really encourage and ask you to go through the code samples and actually type them in. You will see that it really helps your understanding and will assure your success in this course! Use your resources: the TAs, the class mailing list, stack overflow, google and push through to success! When you are done, go to Latte and answer these warmup questions:

    • This one is tricky: how come there’s no password field in the database, while there is a validation of a password attribute on the User model. Let’s have a careful answer here, because it’s the only warmup question I am asking for!
    • Are there one or two things you are still confused by? If not, what one or two things were the most memorable about your reading? Deliverable: Do the warmup in Latte and submit by 8am on the day of class.
  3. Rails PA 2: Continue working on PA Rails 2

Demo

Controller Actions

  • Who calls the controller action?
  • What parameters are supplied automatically by the controller action?
  • Why does it take two separate actions to implement “create”?

Look at next class

  • Look at homework TDD