Sunday, May 10, 2009

My RailsSpace Journey - Day 9

  1. Starting Chapter 10 (Community).
  2. Created Community controller with 3 views (index, browse, search). Had to rename the "html.erb" to "rhtml" suffix on the views. (p.303-304)
  3. Updated views/layouts/application.rhtml file and ran "rake" and all tests passed (18,110,0,0) (26,132,,0,0) (1,2,0,0). (10.1/p.304)
  4. Created new directory, lib/tasks/sample/data. (p.305)
  5. Created lib/tasks/sample_data.rake file. (10.2/p.306)
  6. Ran this: $ rake db:sample_data:load (p.307) and got this:
    (in C:/cygwin/home/jasnow/SPACE-RAILSSPACE/railsspace)
    Loaded data from users.yml
    Loaded data from specs.yml
    Loaded data from faqs.yml
  7. Checked config/routes.rb in Listing 10.3 with current version. Looked OK, so no change. (10.3/p.309)
  8. Updated community_controller.rb file and ran "rake" and all tests passed. (10.4/p.312)
  9. Updated views/community/index.rhtml file and ran "rake" and all tests passed. (10.5/p.313)
  10. Updated public/stylesheets/site.css file and ran "rake" and all tests passed. (10.6/p.315)
  11. Brought up Figure 10.2 (web page) and it worked. WOW!!! (F10.2/p.316)
  12. Updated views/community/index.rhtml file and ran "rake" and all tests passed. (10.7/p.316)
  13. Created and filled in views/community/_user_table.rhtml file and ran "rake" and all tests passed. (10.8/p.316)
  14. Checked config/routes.rb in Listing 10.9 with current version. Looked OK, so no change. (10.9/p.317)
  15. Updated models/user.rb file and ran "rake" and all tests passed. (10.10/p.317)
  16. Updated models/spec.rb file and ran "rake" and all tests passed. (10.11/p.318)
  17. Updated public/stylesheets/site.css file and ran "rake" and all tests passed. (10.12/p.318)
  18. Brought up Figure 10.3 (web page) (also Figure 10.1) and it worked for "S" (Snow"). WOW!!! (F10.3, F10.1/p.318,308)
  19. Updated helpers/application_helper.rb file and ran "rake" and all tests passed. (10.13/p.320)
  20. Changed one line ( map.connect '', :controller => 'site', :action => 'index', :id => nil) in config/routes.rb file and ran "rake" and all tests passed. (10.14/p.320)
  21. Brought up Figure 10.4 (web page)) and it worked for "S" (Snow"). (F10.4/p.320)
  22. Updated community_controller.rb file TWICE and ran "rake" both times and all tests passed. (10.15,10.16/p.322)
  23. Updated helpers/application_helper.rb file and ran "rake" and all tests passed. (10.17/p.322)
  24. Updated views/community/_user_table.rhtml file and ran "rake" and all tests passed. (10.18/p.323)
  25. Created and filled in views/community/_result_summary.rhtml file and ran "rake" and all tests passed. (10.19/p.323)
  26. Updated views/community/index.rhtml file and ran "rake" and all tests passed. (10.20/p.325)
  27. Ran "http://localhost:3000/community/index/S" and got this error:
    undefined method `paginate' for #
  28. So I googled for an answer and got this. Ran this: ./script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination
  29. Had problems with solution so went bad to hopefuly good Listing 10.15 for community_controller.rb. (p.322)
  30. Reversed Listing 10.17 for helpers/application_helper.rb. (p.322)
  31. ROLLED BACKED sections 10.4.1 (Adding pagination) and 10.4.2 (A results summary) (last 2 sections in chapter 10). (p.321-325) Summary: 10.16 => 10.4; 10.17 => 10.13; 10.18 => 10.8; 10.20 => 10.7.
  32. RESTORED END OF CHAPTER 9 FILES AND WEB PAGE WORKS AGAIN.
  33. START CHAPTER 10 again tomorrow.

No comments:

Post a Comment