5.2. Seeing Real
Photos
This chapter is highly dependent on previous
chapters, so if you are implementing this Photo Share application
as you read, make sure that you are starting this chapter with the
same source code that we have. For
example, in the previous chapter, when you generated the
scaffolding for each of the database tables, you could easily have
let the scaffold generator overwrite the model classes in which we
had specified the relationships between the tables.
The easiest way to make sure you are starting
with the right code is to download our ZIP file that contains
everything we have done up to this point. You can find this file on
the site's web site: http://woollybugger.info/catalog/rubyrails.
You will want to update config/database.yml to
specify your database configuration.
You also need some real photos to display. That
same ZIP file contains sample photos, in the public/images/photos directory.
And, finally, make sure that your database
contains the same data as ours. Use db/create_tables_with_data.sql to recreate the
tables and data in your Photo Share database.
|