tors/jquery-fileupload-rails-paperclip-example — pull request #34 by mikbe (2014-11-10 18:40:46+00:00)
Title: Fix thumbnaisl not showing

A minor omission was made that didn't allow thumbnails to show. For completeness thumbnails really should show.

To fix this yourself just add styles and a new hash to `to_jq_upload` like so:

class Upload < ActiveRecord::Base
attr_accessible :upload
has_attached_file :upload,
styles: {
original: "600x600>",
thumbnail: "40x40#"
}

include Rails.application.routes.url_helpers

def to_jq_upload
{
"name" => read_attribute(:upload_file_name),
"size" => read_attribute(:upload_file_size),
"url" => upload.url(:original),
"delete_url" => upload_path(self),
"delete_type" => "DELETE",
"thumbnail_url" => upload.url(:thumbnail)
}
end

end