- Starting Chapter 9 (Personal Profiles).
- Created Profile controller with 2 actions (index, show). (p.257)
- Edited the config/routes.rb file. (9.1/p.257-258)
- Edited the profile_controller. (9.2/p.258)
- Edited two views: show.rhtml, index.rhtml (9.3,9.4/p.259)
- Created and edited Spec model (migration). Then do the migration/Done. (9.5/p.260-262)
- Edited models/spec.rb. (9.6/p.262)
- Edited config/environment.rb (9.7/p.263)
- Tried to run user_controller_tests and it is broken.
- Edited models/user.rb. (9.8/p.265)
- Edited models/spec.rb. (9.9/p.265)
- Repeated step 2 (new Profile controller) Ran "rake"/Worked.
- SKIPPED STEP 3 (routes.rb). DID NOT CHANGE config/routes.rb. ######
- Repeated step 4 (profile_controller). Ran "rake"/Worked.
- Repeated step 5 (2 views). Ran "rake"/Worked.
- Repeated step 6 (new Spec model). Skipped the migration because I did it before. Also had to delete the Migration I just created, but did not want to use because rake would not run until migration was done. Ran 'rake"/Worked. Got extra test.
- Repeated step 7 (edited spec model). Ran "rake"/Worked.
- SKIPPED STEP 8 (environment.rb). DID NOT CHANGE config/ environment.rb.
- Could not continue safety with chapter 9 so I stopped for lunch and study group.
- Later I went back and read the whole chapter and marked it up.
- Brought up the project. Walked successfully thru the top level windows and ran "rake" (all the tests). All tests (11,54,0,0) (19,94,0,0) (1,2,0,0) ran cleanly.
- So starting Chapter 9 again.
- step 2: Profile controller is already created, so skipped. (p.257)
- step 4: profile_controller has already be edited, so skipped. (9.2/p.258)
- step 5: Two views has already be edited, so skipped. (9.3,9.4/p.259)
- step 6: Spec model already been created/migrated, so skipped. (9.5/p.260-261)
- step 7; Spec.rb already been edited, so skipped. (9.6/p.262)
- step 3: YES, I edited the new lines into config/routes.rb file and commented out the old lines. Then ran "rake" and all tests passed. (9.1/p.257)
- Brought up Figure 9.1 (web page) and it worked. WOW!!! (F9.1/p.254)
- step 8+9: YES, I edited (added one line: DB_STRING_MAX_LENGTH = 255) to end of config/environment.rb file. THE TRICK WAS NOT DOING THIS STEP AS A CUT-AND-PASTE. Restarted web server and then ran "rake" (step 9) and all tests passed. (9.7/p.263)
- Brought up Figure 9.2 (bad user) (web page) and it worked. WOW!!! (F9.2/p.259-260)
- step 10: Repeated edit on models/user.rb and then ran "rake" and all tests passed. (9.8/p.265)
- step 11: Repeated edit on models/spec.rb and then ran "rake" and all tests passed. (9.9/p.265)
- Created new Spec controller with 2 views (index, edit) and then ran "rake" and all tests passed. (p.266)
- Edited application.rb controller and then ran "rake" and all tests passed. NOTE: Got one new test and one new assertion. (9.10/p.266-267)
- Filled out new spec_controller.rb file and then ran "rake" and all tests passed. (9.11/p.267)
- Edit helpers/applcation_helper.rb file and then ran "rake" and all tests passed. (9.12/p.269)
- Edited (added one line: HTML_TEXT_FIELD_SIZE = 15) to end of config/environment.rb file. Restarted web server and then ran "rake" and all tests passed. (9.13/p.269-270)
- Filled out new view/spec/edit.rhtml file and then ran "rake" and all tests passed. (9.14/p.270-271)
- Brought up Figure 9.3(web page) and it worked ONCE I LOGGED IN. WOW!!! (F9.3/p.271)
- Tried Figure 9.4(web page) and it worked sort of (less params). (F9.4/p.272)
- Edited application.rb controller and then ran "rake" and all tests passed. (9.15/p.272-273)
- Edited spec_controller.rb file and then ran "rake" and all tests passed. (9.16/p.273)
- Edited spec_controller_test.rb file and then ran "rake" and all tests but 5 assertions passed. Also got 5 new tests, s9 (11,54,0,0) (24,94,0,5)(1,2,0). (9.17/p.273-274)
- Edited test/test_helper.rb file and ran "rake" and got same results as step 44. (9.18/p.275)
- Filled out test/fixtures/specs.yml file and then ran "rake" and all tests passed with some new numbers (11,54,0,0) (24,127,0,0)(1,2,0). (9.19/p.275) FIXED
- Filled out new test/unit/spec_test.rb and then ran "rake" and all tests passed with some new numbers (17,83,0,0) (24,127,0,0)(1,2,0). (9.20/p.276)
- Edited user_controller.rb and then ran "rake" and all tests passed with 3 new assertions (17,83,0,0) (24,130,0,0)(1,2,0). (9.21/p.277)
- Edited models/spec.rb file and then ran "rake" and all tests passed (9.22/p.277)
- Edited views/layouts/application.rhtml file and some middle tests failed (24,89,8,0) (9.23/p.278)
- Repeated previous step because I mis-cut-pasted it and ran rake and all tests passed. (9.23/p.278)
- Created and filled in brand new public/stylesheets/profile.css file and ran rake and all tests passed (same numbers). (9.24/p.278)
- Created and filled in brand new (I THINK) views/user/index.rhtml file and ran rake and all tests passed (same numbers). (9.25/p.279)
- Edited views/user/index.rhtml file and ran rake and all tests passed (same numbers). (9.26/p.281)
- Created and filled in views/spec/_field_row.rhtml partial file and all tests passed (same numbers). (9.27/p.281)
- I renamed views/user/index.html.erb to hid_index.html.erb and refreshed hub page and got Figure 9.5(web page) and also Figure 9.6 (web page) with the "Empty right column, for now" (F9.5/p.280) so somewhere a long the way index.html.erb went away. Then ran "rake" and all tests passed (same numbers). (9.27, F9.5, F9.6/p.281-282)
- Edited (changed one word: s/map.connect/map.profile/) in config/routes.rb file. Restarted web server and then ran "rake" and all tests passed. (9.28/p.283)
- Filled in app/helpers/profile_helper.rb file, restarted web server and then ran "rake" and all tests passed. (9.28/p.283)
- Edited app/helpers/profile_helper.rb file and then ran "rake" and all tests passed. (9.29/p.284)
- Edited user_controller.rb file and then ran "rake" and all tests passed. (9.29.5/SEE ERATA/see bottom of p.284)
- Edited views/user/index.rthml file and then ran "rake" and some middle tests failed (24,125,0,2). (9.30/p.285-286)
- Edited public/stylesheets/profile.css file and then ran "rake" and some middle tests failed (24,125,0,2). (9.31/p.286)
- Created and filled in lib/string.rb file and ran "rake" and got same results as previous step. (9.32/p.287)
- Edited app/helpers/application_helper.rb file and ran "rake" and all tests passed. (9.33/p.287) FIXED
- Brought up Figure 9.7 (web page) and it worked. WOW!!! (F9.7/p.289)
- Created new Faq model. (p.288)
- Filled in migration script (....create faqs.rb) and ran "rake" and all tests passed. Got one new test and one new assertion. (9.34/p.289)
- Filled in new Faq model and ran "rake" and got same results as previous step. (9.35/p.290)
- Edited (added one line: DB_TEXT_MAX_LENGTH = 40000) to end of config/environment.rb file. Restarted web server and then ran "rake" and all tests passed. (9.36/p.290)
- Created new Faq controller with 2 views (index, edit). (p.292)
- Filled in new faq_controller.rb file and ran "rake" and all tests passed. Got one new middle test and one new middle assertion. (9.35/p.290)
- Edited (added one line: map.hub 'user', :controller => 'user', :action => 'index') in config/routes.rb file. Restarted web server and then ran "rake" and all tests passed as previous step. (9.39/p.292)
- Filled in new faq_controller.rb file and ran "rake" and all tests passed. (9.40/p.293)
- Filled in new views/faq/edit.rhtml file and ran "rake" and all tests passed. (9.41/p.293)
- Created and filled in views/faq/_answer_text_area.rhtml file and ran "rake" and all tests passed. (9.42/p.294)
- Updated public/stylesheets/profile.css and ran "rake" and all tests passed. (9.43/p.294)
- Updated user_controller.rb file and ran "rake" and all tests passed. (9.44/p.295)
- Updated user_controller.rb file again and ran "rake" and all tests passed. (9.45/p.296)
- Filled in new views/user/index.rhtml file and ran "rake" and all tests passed except 2 assertions. (9.46/p.296)
- Created and filled in views/faq/_sidebar_box.rhtml file and all tests passed. (9.47/p.297) FIXED
- Filled test/fixtures/faqs.yml file. (9.48/p.298)
- Filled in test/unit/faq.rb file and ran "rake" and all tests (18,110,0,0) (25,131,0,0) (1,2,0,0) passed. (9.49/p.299)
- Update profile_controller.rb file and ran "rake" and all tests passed. (9.50/p.300)
- Update helpers/profile_helper.rb file and ran "rake" and all tests passed. (9.51/p.300)
- Filled in views/profile/show.rhtml file and ran "rake" and all tests passed. (9.52/p.301)
- End of Chapter 10 so I pushed it to github.com.
Saturday, May 9, 2009
My RailsSpace Journey - Day 8 - Chapter 9
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment