Ruby on Rails - an Idiots guide.
This is a working document, and I have added it to this site, as I tend to update mostly here.
Firstly, lets remind ourselves on what has been done so far:
1 Install Ruby on Rails, including running gem install rails
2 Install mysql and create a database and table
3 Create a test environment at rubydev on the C: drive
4 Create the history folder - rails history
5a Edit config/database.yml before running the scaffold generator
5b Run the scaffold generator - ruby script/generate scaffold romford view
6 Run the controller generator - ruby script/generate controller romford
7 Start the ruby server - ruby script/server
7a Edit the romford_controller.rb - [ add line scaffold :romford ]
8 Browse to http://localhost:3000/romford
Lets do some more interesting stuff, prettying it up:
9 First task is to add a frame around the table, and add alternating colours - this is straight out of the Agile Development book.
I am going to edit the file app\views\view\list.rhtml, and add the column names as labels - these are better descriptive names.
<table border = "1">
<tr>
<th width="30%"><em>Abode</em></th>
<th width="15%"><em>Name</em></th>
<th width="15%"><em>Surname</em></th>
<th width="10%"><em>Male</em></th>
<th width="10%"><em>Female</em></th>
<th width="20%"><em>Trade</em></th>
</tr>
You can now compare the difference from

rather than this http://localhost:3000/romford/list
