Section 5.2. Seeing Real Photos


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 book's web site: http://www.oreilly.com/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.



Ruby on Rails[c] Up and Running
Ruby on Rails[c] Up and Running
ISBN: B003D3OGCY
EAN: N/A
Year: 2006
Pages: 94

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net