I'm using paperclip to upload all sorts of files (text documents, binaries, images).
I'd like to put this in my model:
has_attached_file :attachment, :styles => { :medium => "300x300>", :thumb => "100x100>" }
but it has to perform the styles only if it's an image. I tried adding
if :attachment_content_type =~ /^image/
but it didn't work.