Monday, May 11, 2009

My RailsSpace Journey - Day 10

  1. Starting Chapter 10 (Community).
  2. Checked website and it appears okay.
  3. Created Community controller with 3 views (index, browse, search). Had to rename the "html.erb" to "rhtml" suffixes on the views. (p.303-304)
  4. 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)
  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)
  17. 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)
  18. Updated helpers/application_helper.rb file and ran "rake" and all tests passed. (10.13/p.320)
  19. Changed one line (map.connect '', :controller => 'site', :action => 'index', :id => nil) in config/routes.rb file, RESTARTED SERVER, and ran "rake" and all tests passed. (10.14/p.320)
  20. Brought up Figure 10.4 (web page)) and it worked for "S" (Snow"). (F10.4/p.320)
  21. SKIPPING SECTION 10.4.1 (Adding pagination) because I had problems with plugin. (10.15,10.16, 10.17,10.18/p.321-323)
  22. Solution: http://blog.railsspace.com/past/2008/1/31/railsspace_will_paginate/
  23. Created and filled in views/community/_result_summary.rhtml file and ran "rake" and all tests passed. (10.19/p.323)
  24. Updated views/community/index.rhtml file and ran "rake" and all tests passed. (10.20/p.325)
  25. End of Chapter 10 (no pagination), so pushed the code to github.com/jasnow/railsspace. (p.325)




No comments:

Post a Comment