Skip to content

Commit

Permalink
changed paperclip and pdfs so that pdf thumbnails are generated
Browse files Browse the repository at this point in the history
  • Loading branch information
kbingman committed Jan 10, 2009
1 parent c61bc69 commit 2be6c58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def types_to_conditions(types)
thumbnails = {}
end
thumbnails[:icon] = ['42x42#', :png]
thumbnails[:thumbnail] = '100x100>'
thumbnails[:thumbnail] = ['100x100>', :png]

has_attached_file :asset,
:styles => thumbnails,
Expand Down Expand Up @@ -88,7 +88,7 @@ def thumbnail(size = nil)
self.asset.url
else
if self.pdf?
"/images/assets/pdf_#{size.to_s}.png"
self.asset.url(size.to_sym)
elsif self.movie?
"/images/assets/movie_#{size.to_s}.png"
elsif self.audio?
Expand Down

0 comments on commit 2be6c58

Please sign in to comment.