is_attachment (Ruby on Rails)
Ruby on Rails plugin for uploading and processing of file uploads with ActiveRecord models. Integration with RMagick, MiniMagick, BackgroundRb, js_image_cropper and more.
Extensible with Custom Image Transformers, Storage Engines or Image Engines.
Example:
The following example shows how you can upload an image file, and automatically have other versions created. :face_crop is interesting – it uses Cropper – which in this case will just resize the original image to 200×200, but then makes it easy for you to recrop the original version exactly how you want it (to produce an image 200×200).class Mugshot < ActiveRecord::Base
is_attachment :backgroundrb => true,
:image_versions => {:thumb => 50, :face_crop => { :cropper => 200 } },
:validate => { :content_type => :image }
end
plugin_demo has many end-to-end examples of how to use is_attachment.
Installation
ruby script/plugin install https://please.peelmeagrape.net/svn/public/plugins/is_attachment/trunk is_attachment
Note: The rails plugin script currently fails against our server (without reporting the problem, which is that openssl doesn’t like our certificate). If you see Plugin not found error, then try instead:
piston import https://please.peelmeagrape.net/svn/public/plugins/is_attachment/trunk vendor/plugins/is_attachment
or
svn export https://please.peelmeagrape.net/svn/public/plugins/is_attachment/trunk vendor/plugins/is_attachment
The problem seems to be that openssl doesn’t include the root certificate from our certificate issuer.
Google Group – discussion, support, announcements, requests etc for is_attachment rails plugin.