f h o b i a  - Web Site Change Log

f h o b i a

The Art of Brian Muramatsu


Piece Ratings Model and Migration Fri Jun 22 23:14:05 2007 -0700 Adds a model for ratings and code to add ratings to pieces. An average rating and the number of ratings is shown for each piece. gallery/app/controllers/gallery_controller.rb | 14 ++++++++++++++ gallery/app/models/piece.rb | 19 +++++++++++++++++++ gallery/app/models/rating.rb | 3 +++ gallery/app/views/gallery/exhibit.rhtml | 18 +++++++++++++++++- gallery/db/migrate/010_create_ratings.rb | 19 +++++++++++++++++++ gallery/db/schema.rb | 11 ++++++++++- gallery/test/fixtures/ratings.yml | 5 +++++ gallery/test/unit/rating_test.rb | 10 ++++++++++ 8 files changed, 97 insertions(+), 2 deletions(-)
Display 1 Piece at a Time Sun Jun 17 19:58:47 2007 -0700 Changed the gallery controller to display only one image at a time with links at the bottom for other images. This is similar to the style currently online. In the future, this should be AJAX-ified :-). gallery/app/controllers/gallery_controller.rb | 8 ++++++++ gallery/app/views/gallery/exhibit.rhtml | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-)
Create Partial for Images Sun Jun 17 18:17:10 2007 -0700 Have the view template delegate to a partial for Images without having to know the type of Piece. gallery/app/views/gallery/_image.rhtml | 1 + gallery/app/views/gallery/exhibit.rhtml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletions(-)
Display Exhibit Images Sun Jun 17 17:51:48 2007 -0700 Update the exhibit template to show the images and fix the migration script to point toward the correct links using relative paths to the root. gallery/app/views/gallery/exhibit.rhtml | 6 ++- gallery/db/migrate/009_add_pieces_images_data.rb | 70 +++++++++++----------- 2 files changed, 40 insertions(+), 36 deletions(-)
Add Static Image Data Sun Jun 17 17:13:28 2007 -0700 Add barebones static image data to planned directories and adjust the migration script to point to those directories. gallery/db/migrate/009_add_pieces_images_data.rb | 77 +++++++++++----------- gallery/public/exhibits/2002/images/1.jpg | Bin 0 -> 89525 bytes gallery/public/exhibits/2002/images/2.jpg | Bin 0 -> 91576 bytes gallery/public/exhibits/2002/images/3.jpg | Bin 0 -> 100126 bytes gallery/public/exhibits/2002/images/4.jpg | Bin 0 -> 87339 bytes gallery/public/exhibits/2002/images/5.jpg | Bin 0 -> 109822 bytes gallery/public/exhibits/compart/images/1.jpg | Bin 0 -> 42568 bytes gallery/public/exhibits/compart/images/2.jpg | Bin 0 -> 160328 bytes gallery/public/exhibits/compart/images/3.jpg | Bin 0 -> 142218 bytes gallery/public/exhibits/compart/images/4.jpg | Bin 0 -> 86813 bytes gallery/public/exhibits/gradients/images/1.jpg | Bin 0 -> 29577 bytes gallery/public/exhibits/gradients/images/2.jpg | Bin 0 -> 31394 bytes gallery/public/exhibits/gradients/images/3.jpg | Bin 0 -> 43552 bytes gallery/public/exhibits/gradients/images/4.jpg | Bin 0 -> 28809 bytes gallery/public/exhibits/gradients/images/5.jpg | Bin 0 -> 77847 bytes gallery/public/exhibits/transforms/images/1.jpg | Bin 0 -> 58317 bytes gallery/public/exhibits/transforms/images/2.jpg | Bin 0 -> 71781 bytes gallery/public/exhibits/transforms/images/3.jpg | Bin 0 -> 99286 bytes gallery/public/exhibits/transforms/images/4.jpg | Bin 0 -> 39010 bytes gallery/public/exhibits/transforms/images/5.jpg | Bin 0 -> 63681 bytes gallery/public/exhibits/transforms/images/6.jpg | Bin 0 -> 56198 bytes gallery/public/exhibits/vacation/images/1.jpg | Bin 0 -> 115057 bytes gallery/public/exhibits/vacation/images/2.jpg | Bin 0 -> 135969 bytes gallery/public/exhibits/vacation/images/3.jpg | Bin 0 -> 152231 bytes gallery/public/exhibits/vacation/images/4.jpg | Bin 0 -> 180424 bytes gallery/public/exhibits/vacation/images/5.jpg | Bin 0 -> 142816 bytes gallery/public/exhibits/vacation/images/6.jpg | Bin 0 -> 183267 bytes 27 files changed, 38 insertions(+), 39 deletions(-)
Join Pieces and Images Sun Jun 17 16:37:26 2007 -0700 Adds image data and links it to polymorphic Pieces data. Also fixes a bug in the migration for adding the polymorphic Pieces table. The remove_column calls were missing the table name. gallery/app/views/gallery/exhibit.rhtml | 2 +- gallery/db/migrate/008_poly_pieces_images.rb | 4 +- gallery/db/migrate/009_add_pieces_images_data.rb | 64 ++++++++++++++++++++++ gallery/db/schema.rb | 2 +- 4 files changed, 68 insertions(+), 4 deletions(-)
Enable Polymorphic Inheritance for Pieces and Images Sun Jun 17 15:48:19 2007 -0700 gallery/app/models/image.rb | 1 + gallery/app/models/piece.rb | 1 + gallery/db/migrate/008_poly_pieces_images.rb | 11 +++++++++++ gallery/db/schema.rb | 6 ++++-- 4 files changed, 17 insertions(+), 2 deletions(-)
Image Model and Migration Sun Jun 17 15:25:16 2007 -0700 Create a model for images that will polymorphically inherit from Piece. Images have a singlle url to an image. gallery/app/models/image.rb | 2 ++ gallery/db/migrate/007_create_images.rb | 11 +++++++++++ gallery/db/schema.rb | 6 +++++- gallery/test/fixtures/images.yml | 5 +++++ gallery/test/unit/image_test.rb | 10 ++++++++++ 5 files changed, 33 insertions(+), 1 deletions(-)
Display Exhibit Contents Sun Jun 17 14:51:17 2007 -0700 Make the gallery index link to the individual exhibits and show what pieces are in each exhibit on the linked page. gallery/app/controllers/gallery_controller.rb | 4 ++++ gallery/app/views/gallery/exhibit.rhtml | 11 +++++++++++ gallery/app/views/gallery/index.rhtml | 6 ++++-- 3 files changed, 19 insertions(+), 2 deletions(-)
Exhibits and Pieces Join Data Migration Sun Jun 17 14:33:05 2007 -0700 Add data that joins exhibits and pieces together in a migration. gallery/db/migrate/006_add_exhibits_pieces_data.rb | 66 ++++++++++++++++++++ gallery/db/schema.rb | 2 +- 2 files changed, 67 insertions(+), 1 deletions(-)