Tuesday, April 21, 2009

Week 10: Rails Passion Course

  1. Week 10: ActiveRecord Associations Basics (Topics covered: What is an Association?, Auto-generated methods, Cardinality, Unsaved objects and association)
  2. Week 10 Resources
    o ActiveRecord::Associations:ClassMethods API from api.rubyonrails.org
    o Building Relationships Between Rails Models tutorial by Brian Leonard and Gail Chappell
  3. 5525_rails_associations.zip (Unzip it in a directory of your choice and read lab document from /rails_associations/index.html to proceed) (4/21/09: Downloaded)
  4. Presentation - PDF: 1 slide per page (OR) OpenOffice file (22 pages)
  5. Online Lab/Change Log document (This is the same document you will find in the hands-on lab zip file) (84 pages)
  6. EXERCISE #0: Start MySQL database server (p.g2) (4/21/2009: done)
  7. EXERCISE #1: Add one-to-many association to rubyweblog application. (p.2-28)
  8. (1.1) Create Comment Model class (p.3-6)
  9. (1.2) Migrate database (p.6-7)
  10. (1.3) Add association macros to the Model classes (p.8-11)
  11. (1.4) Modify controller (p.11-15)
  12. (1.5) Modify [view] templates (p.15-17)
  13. (1.6) Save the changes (p.17-18)
  14. (1.7) Refresh the browswer and perform user operation (p.19-21)
  15. (1.8) Observing the database tables (p.22-26)
  16. (1.9) Use Rails Console (p.26-28)
  17. EXERCISE #2: Options for has_many (p.28-46)
  18. (2.0) Create fresh test data using migration (p.28-33)
  19. (2.1) Exercise :order option (p.34-39)
  20. (2.2) Exercise :destroy option (p.39-46)
  21. EXERCISE #3: Add many-to-many association to rubyweblog application (p.46-65)
  22. (3.1) Create Category model class (p.46-49)
  23. (3.2) Create "categories_posts" table through migration (p.49-55)
  24. (3.3) Add many-to-many relationship between Post and Category models (p.55-58)
  25. (3.4) Create test data through migration (p.59-64)
  26. (3.5) Use Rails Console (p.64-65)
  27. EXERCISE #4: Add many-to-many association to rubyweblog application using through - not ready yet
  28. (4.1) Recreate rubyweblog_development database (p.66-68)
  29. (4.2) Remove migration files that are not needed (p.68-69)
  30. (4.3) Create a join model (p.70-73)
  31. (4.4) Modify Post and Category models (p.73-75)
  32. (4.5) Create test data through migration (p.75-79)
  33. (4.6) Verify that the data tables are created correctly (p.79-83)
  34. (4.7) Use Rails Console (p.83-84)
  35. Finished Exercises (4:30pm)
  36. Homework (p.84)

No comments:

Post a Comment