1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Updated photo model to use original upload as original size. Added host to postgres config.

This commit is contained in:
Dan Barber 2010-10-12 13:25:44 -04:00
parent 45612b8c85
commit 22994662da
2 changed files with 236 additions and 2 deletions

View File

@ -3,8 +3,7 @@ require 'mini_exiftool'
class Photo < ActiveRecord::Base
has_and_belongs_to_many :categories
has_attached_file :photo, :styles => { :original => "1024x1024>",
:size17 => "476x476#",
has_attached_file :photo, :styles => { :size17 => "476x476#",
:size11 => "308x308#",
:size8 => "224x224#",
:size5 => "140x140#",

View File

@ -7558,3 +7558,238 @@ Started GET "/categories?page=1" for 127.0.0.1 at 2010-10-12 10:05:01 -0400
Photo Load (0.5ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (21.3ms)
Completed 200 OK in 83ms (Views: 23.2ms | ActiveRecord: 1.5ms)
Started GET "/categories/4/photos" for 127.0.0.1 at 2010-10-12 10:40:14 -0400
Processing by PhotosController#index as HTML
Parameters: {"category_id"=>"4"}
Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE ("categories"."id" = 4) LIMIT 1
Photo Load (0.4ms) SELECT * FROM "photos" INNER JOIN "categories_photos" ON "photos".id = "categories_photos".photo_id WHERE ("categories_photos".category_id = 4 ) LIMIT 11 OFFSET 0
Rendered photos/index.html.erb within layouts/photos (18.1ms)
Completed 200 OK in 147ms (Views: 31.9ms | ActiveRecord: 0.7ms)
Started GET "/" for 127.0.0.1 at 2010-10-12 10:40:17 -0400
Processing by PagesController#index as HTML
Photo Load (0.4ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 1
Rendered pages/index.html.erb within layouts/photos (19.6ms)
Completed 200 OK in 50ms (Views: 37.4ms | ActiveRecord: 0.4ms)
Started GET "/about" for 127.0.0.1 at 2010-10-12 10:40:18 -0400
Processing by PagesController#about as HTML
Page Load (0.2ms) SELECT "pages".* FROM "pages" WHERE ("pages"."name" = 'about') LIMIT 1
Rendered pages/about.html.erb within layouts/photos (5.5ms)
Completed 200 OK in 68ms (Views: 7.5ms | ActiveRecord: 0.2ms)
Started GET "/categories" for 127.0.0.1 at 2010-10-12 10:40:23 -0400
Processing by CategoriesController#index as HTML
Category Load (0.9ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 0
SQL (0.1ms) SELECT COUNT(*) AS count_id FROM "categories"
Photo Load (0.6ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (24.5ms)
Completed 200 OK in 97ms (Views: 38.9ms | ActiveRecord: 1.5ms)
Started GET "/" for 127.0.0.1 at 2010-10-12 10:40:26 -0400
Processing by PagesController#index as HTML
Photo Load (0.4ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 1
Rendered pages/index.html.erb within layouts/photos (14.5ms)
Completed 200 OK in 63ms (Views: 16.4ms | ActiveRecord: 0.4ms)
Started GET "/contacts/new" for 127.0.0.1 at 2010-10-12 10:40:27 -0400
Processing by ContactsController#new as HTML
Rendered contacts/new.html.erb within layouts/photos (4.6ms)
Completed 200 OK in 12ms (Views: 7.0ms | ActiveRecord: 0.0ms)
Started GET "/contacts/new" for 127.0.0.1 at 2010-10-12 10:40:30 -0400
Processing by ContactsController#new as HTML
Rendered contacts/new.html.erb within layouts/photos (4.6ms)
Completed 200 OK in 12ms (Views: 6.4ms | ActiveRecord: 0.0ms)
Started GET "/about" for 127.0.0.1 at 2010-10-12 10:40:32 -0400
Processing by PagesController#about as HTML
Page Load (0.2ms) SELECT "pages".* FROM "pages" WHERE ("pages"."name" = 'about') LIMIT 1
Rendered pages/about.html.erb within layouts/photos (5.2ms)
Completed 200 OK in 19ms (Views: 7.1ms | ActiveRecord: 0.2ms)
Started GET "/contacts/new" for 127.0.0.1 at 2010-10-12 10:40:33 -0400
Processing by ContactsController#new as HTML
Rendered contacts/new.html.erb within layouts/photos (4.8ms)
Completed 200 OK in 12ms (Views: 6.7ms | ActiveRecord: 0.0ms)
Started GET "/" for 127.0.0.1 at 2010-10-12 10:40:37 -0400
Processing by PagesController#index as HTML
Photo Load (0.3ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 1
Rendered pages/index.html.erb within layouts/photos (47.9ms)
Completed 200 OK in 62ms (Views: 49.8ms | ActiveRecord: 0.3ms)
Started GET "/about" for 127.0.0.1 at 2010-10-12 12:54:08 -0400
Processing by PagesController#about as HTML
Page Load (0.3ms) SELECT "pages".* FROM "pages" WHERE ("pages"."name" = 'about') LIMIT 1
Rendered pages/about.html.erb within layouts/photos (36.6ms)
Completed 200 OK in 1034ms (Views: 63.0ms | ActiveRecord: 0.3ms)
Started GET "/contacts/new" for 127.0.0.1 at 2010-10-12 12:54:38 -0400
Processing by ContactsController#new as HTML
Rendered contacts/new.html.erb within layouts/photos (125.0ms)
Completed 200 OK in 192ms (Views: 157.2ms | ActiveRecord: 0.0ms)
Started GET "/" for 127.0.0.1 at 2010-10-12 12:54:49 -0400
Processing by PagesController#index as HTML
Photo Load (0.5ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 1
Rendered pages/index.html.erb within layouts/photos (105.8ms)
Completed 200 OK in 216ms (Views: 108.2ms | ActiveRecord: 0.5ms)
Started GET "/categories" for 127.0.0.1 at 2010-10-12 12:55:19 -0400
Processing by CategoriesController#index as HTML
Category Load (1.2ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 0
SQL (0.2ms) SELECT COUNT(*) AS count_id FROM "categories"
Photo Load (0.5ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (47.4ms)
Completed 200 OK in 260ms (Views: 69.7ms | ActiveRecord: 1.9ms)
Started GET "/categories/1/photos" for 127.0.0.1 at 2010-10-12 12:55:29 -0400
Processing by PhotosController#index as HTML
Parameters: {"category_id"=>"1"}
Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE ("categories"."id" = 1) LIMIT 1
Photo Load (0.9ms) SELECT * FROM "photos" INNER JOIN "categories_photos" ON "photos".id = "categories_photos".photo_id WHERE ("categories_photos".category_id = 1 ) LIMIT 11 OFFSET 0
Rendered photos/index.html.erb within layouts/photos (50.6ms)
Completed 200 OK in 187ms (Views: 71.7ms | ActiveRecord: 1.3ms)
Started GET "/categories" for 127.0.0.1 at 2010-10-12 12:55:34 -0400
Processing by CategoriesController#index as HTML
Category Load (0.9ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 0
SQL (0.1ms) SELECT COUNT(*) AS count_id FROM "categories"
Photo Load (0.5ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (68.0ms)
Completed 200 OK in 96ms (Views: 69.9ms | ActiveRecord: 1.5ms)
Started GET "/categories?page=2" for 127.0.0.1 at 2010-10-12 12:55:35 -0400
Processing by CategoriesController#index as HTML
Parameters: {"page"=>"2"}
Category Load (0.8ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 4
Photo Load (0.6ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (25.5ms)
Completed 200 OK in 169ms (Views: 27.6ms | ActiveRecord: 1.3ms)
Started GET "/categories/5/photos" for 127.0.0.1 at 2010-10-12 12:55:38 -0400
Processing by PhotosController#index as HTML
Parameters: {"category_id"=>"5"}
Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE ("categories"."id" = 5) LIMIT 1
Photo Load (0.4ms) SELECT * FROM "photos" INNER JOIN "categories_photos" ON "photos".id = "categories_photos".photo_id WHERE ("categories_photos".category_id = 5 ) LIMIT 11 OFFSET 0
Rendered photos/index.html.erb within layouts/photos (46.2ms)
Completed 200 OK in 97ms (Views: 48.7ms | ActiveRecord: 0.8ms)
Started GET "/categories" for 127.0.0.1 at 2010-10-12 12:55:40 -0400
Processing by CategoriesController#index as HTML
Category Load (0.9ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 0
SQL (0.1ms) SELECT COUNT(*) AS count_id FROM "categories"
Photo Load (1.1ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (61.4ms)
Completed 200 OK in 115ms (Views: 64.4ms | ActiveRecord: 2.1ms)
Started GET "/categories?page=2" for 127.0.0.1 at 2010-10-12 12:55:44 -0400
Processing by CategoriesController#index as HTML
Parameters: {"page"=>"2"}
Category Load (0.5ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 4
Photo Load (0.8ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (29.4ms)
Completed 200 OK in 120ms (Views: 32.4ms | ActiveRecord: 1.3ms)
Started GET "/categories/5/photos" for 127.0.0.1 at 2010-10-12 12:55:46 -0400
Processing by PhotosController#index as HTML
Parameters: {"category_id"=>"5"}
Category Load (0.5ms) SELECT "categories".* FROM "categories" WHERE ("categories"."id" = 5) LIMIT 1
Photo Load (0.4ms) SELECT * FROM "photos" INNER JOIN "categories_photos" ON "photos".id = "categories_photos".photo_id WHERE ("categories_photos".category_id = 5 ) LIMIT 11 OFFSET 0
Rendered photos/index.html.erb within layouts/photos (46.6ms)
Completed 200 OK in 99ms (Views: 49.1ms | ActiveRecord: 0.9ms)
Started GET "/categories" for 127.0.0.1 at 2010-10-12 12:55:47 -0400
Processing by CategoriesController#index as HTML
Category Load (0.9ms) SELECT "categories".* FROM "categories" LIMIT 4 OFFSET 0
SQL (0.1ms) SELECT COUNT(*) AS count_id FROM "categories"
Photo Load (0.5ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 2
Rendered categories/index.html.erb within layouts/photos (65.6ms)
Completed 200 OK in 93ms (Views: 67.5ms | ActiveRecord: 1.5ms)
Started GET "/admin/categories" for 127.0.0.1 at 2010-10-12 12:58:16 -0400
Processing by Admin::CategoriesController#index as HTML
AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE ("admin_users"."id" = 1) LIMIT 1
SQL (0.2ms) SELECT COUNT(*) AS count_id FROM "categories"
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/sidebar/_sidebar.html.erb (2.1ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/_index.html.erb (0.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/search/_search.html.erb (1.2ms)
CACHE (0.0ms) SELECT COUNT(*) AS count_id FROM "categories"
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/search/_search.html.erb (1.3ms)
CACHE (0.0ms) SELECT COUNT(*) AS count_id FROM "categories"
Category Load (2.7ms) SELECT "categories".* FROM "categories" LIMIT 15 OFFSET 0
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/table/_table.html.erb (22.1ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_header.html.erb (1.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_apps.html.erb (2.8ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_login_info.html.erb (14.6ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/index.html.erb within layouts/admin/base (193.2ms)
Completed 200 OK in 508ms (Views: 244.8ms | ActiveRecord: 3.2ms)
Started GET "/" for 127.0.0.1 at 2010-10-12 12:58:41 -0400
Processing by PagesController#index as HTML
Photo Load (0.4ms) SELECT "photos".* FROM "photos" ORDER BY RANDOM() LIMIT 1
Rendered pages/index.html.erb within layouts/photos (16.0ms)
Completed 200 OK in 30ms (Views: 18.1ms | ActiveRecord: 0.4ms)
Started GET "/admin/pages" for 127.0.0.1 at 2010-10-12 13:14:00 -0400
Processing by Admin::PagesController#index as HTML
AdminUser Load (23.6ms) SELECT "admin_users".* FROM "admin_users" WHERE ("admin_users"."id" = 1) LIMIT 1
SQL (14.8ms) SELECT COUNT(*) AS count_id FROM "pages"
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/sidebar/_sidebar.html.erb (2.7ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/_index.html.erb (0.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/search/_search.html.erb (1.9ms)
CACHE (0.0ms) SELECT COUNT(*) AS count_id FROM "pages"
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/search/_search.html.erb (1.6ms)
CACHE (0.0ms) SELECT COUNT(*) AS count_id FROM "pages"
Page Load (0.2ms) SELECT "pages".* FROM "pages" LIMIT 15 OFFSET 0
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/table/_table.html.erb (5.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_header.html.erb (1.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_apps.html.erb (2.8ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_login_info.html.erb (1.0ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/index.html.erb within layouts/admin/base (314.4ms)
Completed 200 OK in 703ms (Views: 391.0ms | ActiveRecord: 38.7ms)
Started GET "/admin/pages/edit/1" for 127.0.0.1 at 2010-10-12 13:14:03 -0400
Processing by Admin::PagesController#edit as HTML
Parameters: {"id"=>"1"}
AdminUser Load (0.1ms) SELECT "admin_users".* FROM "admin_users" WHERE ("admin_users"."id" = 1) LIMIT 1
Page Load (0.2ms) SELECT "pages".* FROM "pages" WHERE ("pages"."id" = 1) LIMIT 1
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/sidebar/_sidebar.html.erb (1.7ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/_edit.html.erb (0.3ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/templates/_string.html.erb (1.2ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/templates/_string.html.erb (1.0ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/templates/_text.html.erb (0.7ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/_form.html.erb (14.8ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_header.html.erb (0.8ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_apps.html.erb (2.0ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/helpers/_login_info.html.erb (0.7ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/bundler/gems/typus-e0ce90d39989/app/views/admin/resources/edit.html.erb within layouts/admin/base (99.5ms)
Completed 200 OK in 220ms (Views: 123.4ms | ActiveRecord: 0.3ms)