title: How to set Paperclip style work only if contenttype is image?
body: <p>I am using the following:</p>
  
  <pre><code>has_attached_file :file,:styles =&gt; { :thumbnail =&gt; '320x240!'},:url =&gt; "/images/:attachment/:id/:style/:basename.:extension",:path =&gt; ":rails_root/public/images/:attachment/:id/:style/:basename.:extension"
  
  validates_attachment_content_type :file, :content_type =&gt; [ 'image/gif', 'image/png', 'image/x-png', 'image/jpeg', 'image/pjpeg', 'image/jpg' ]
  </code></pre>
  
  <p>To upload both images and video. If I use <code>:style =&gt;{}</code> then image does not upload. I want to use <code>:style</code> method only if content type of file is image.</p>