Permalink
Browse files

Display thumbnails.

  • Loading branch information...
1 parent 7d99a4f commit 1b233ac1a86042a6c32d1321464d6a5a98aa2a4c @halogenandtoast halogenandtoast committed Mar 12, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +3 −1 app/models/photo_shout.rb
  3. +1 −1 app/views/photo_shouts/_photo_shout.html.erb
  4. BIN public/.DS_Store
View
@@ -13,3 +13,4 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
+/public/system
@@ -1,4 +1,6 @@
class PhotoShout < ActiveRecord::Base
- has_attached_file :photo
+ has_attached_file :photo, styles: {
+ thumb: "120x120"
+ }
has_one :shout, as: :medium
end
@@ -1 +1 @@
-<%= link_to image_tag(photo_shout.photo), photo_shout.shout %>
+<%= link_to image_tag(photo_shout.photo.url(:thumb)), photo_shout.shout %>
View
Binary file not shown.

0 comments on commit 1b233ac

Please sign in to comment.