2503ICT: Laboratories 3 and 4



Having implemented some simple (preferably relevant) static pages in Laboratories 1 and 2, the goals of these laboratories are to implement simple category management (by admins) and item management (by users) for the auction app.

You may start a new Rails app in which to perform these tasks (if your first app ended in a bad state).


  1. Use a scaffold to allow admins to create, view, update and destroy a small set of categories (of items for sale) such as books, cameras, clothes, movies, music, phones, software, etc. Each category should have a name (a string) and a description (a long string).

    You may base this task on the scaffold app linked to on the Examples page.

    At present, anyone will be able to use this part of the app to manage categories, but later we will restrict it to admins.

    There is no need to edit or create stylesheets for this task as only admins need to manage categories.

    (Please spell "category" and "categories" correctly.)

  2. Without using a scaffold, explicitly create a model, controller, views and routes to allow users to create, view, update and destroy items that are offered for sale. You may follow the Guestbook App Notes as an initial guide.

    Each item should have a name (a string), a description (a long string), a vendor (a string), and a starting_price (a number).

    For this task, items do not need to have a category_id (an integer), but this will be required for Assignment 1.

    For this task, use the list-detail pattern. Lists of items should contain only the name and vendor of each item. Associated with each item is a link to another page that shows the details (i.e., all properties) of that item. This details page should also contain links to update or destroy the item.

  3. Create an appropriate home page for your emerging auction app (or use app/views/items/index.html.erb as the home page).

    Modify your app so that every page has a header and footer with content and links relevant to the emerging app, and that your site has a simple, usable, distinctive appearance. In particular, ensure the top left of the header is a link to the home page of your app and that the About, Contact and Help pages contain relevant content.


Demonstrate that you have completed all the above tasks by the end of Laboratory 4. (5 marks)


  1. See the Resources link above.