Hi there,
Here's how I did mine (ie. getting watermarks applied to uploaded images as well as resizing them).
Hope it helps :)
class Image < ActiveRecord::Base
belongs_to :blog_posts
has_attached_file :info,
:processors => [:watermark],
:styles => {
:mini => "60x60#",
:thumb => "160x160#",
:medium => {
:geometry => "600>",
:watermark_path => "#{RAILS_ROOT}/public/images/watermark_image.png",
:position => "SouthEast"
},
:original => "1x1"
}
validate :check_content_type
def check_content_type
if !['image/jpeg', 'image/pjpeg', 'image/x-png', 'image/gif', 'image/png'].include?(self.info_content_type)
errors.add( 'attachment,', "'#{self.info_file_name}' is not a valid image type")
end
end
end