History of Romford, Hornchurch, Barking and Havering, Rainham, Wennington, Warley etc & Lots of Historical Essex & London Pubs


powered by FreeFind

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

http://localhost:3000/view 

After editing view/list.rhtml

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

Standard Ruby on Rails display

Search this site powered by FreeFind
I get hundreds of emails every day, fortunately most 'spam mails' are deleted by my mail scan settings. The final emails are delivered to various email addresses, and replying to these are not always successful. If you do not hear from me in a timely fashion, please feel free to email again, I do not mind! This is a pure PUBS history site, I doubt if I know where the PUBS are NOW, but try the site for where they were a hundred years ago, again enjoy!
Once you have discovered enough history of Essex; why not study to undergraduate or postgraduate level in Computer Science or Electronics Engineering at the Department of Computing and Electronic Systems, Essex University in Colchester, Essex? It is not only a great place to study, but also a foreleader in technology at an UK leading University with courses and doctoral research in Robotics, Natural Engineering, Intelligent Systems, Embedded Systems, Networking and Photonics, Laser Technology etc.
Updated in April 2008 by Kevan.
And Last updated on: Sunday, 27-May-2007 10:49:07 PDT