title: Image resize in ruby on rails
body: <p>Like this I am currently uploading a file ( image ) in my ruby application .. I need to resize the image after uploading ... please help for resizing the image</p>
  
  <p>uploaded_io = params[:category][:thumb]</p>
  
  <pre><code>if uploaded_io != ""
    name = uploaded_io.original_filename
    if(FileTest.exist?("#{RAILS_ROOT}/public/data/#{name}"))
      id = Category.maximum('id').to_s
      id = id.to_i+ 1
      name =id.to_s+"_"+name
    end
  </code></pre>
  
  <p>Thanks</p>