Sha256: 4fdec0a5a1f16b7409d2f493631aed10aaad8297e26f9ed9b4dcc29f62ed5b2b
Contents?: true
Size: 1.03 KB
Versions: 4
Compression:
Stored size: 1.03 KB
Contents
# Carrierwave::Processor > ATTENTION! Now works only with rails >= 4.0.3 > because of *prepend* support ## Installation To use with Bundler: gem 'carrierwave-processor', '~> 1.0' To require in non-rails require 'carrierwave/processor' ## Use Now you can write groups of Carrierwave processors and versions outside of Uploader Just use **carrierwave_processor** somewhere for processor declaration carrierwave_processor :image do process :fix_exif_rotation process :convert => 'jpg' version :square do process :scale => [100, 100] end version :default do process :scale => [500, 500] end version :small do process :scale_to_fit => [100, 100] end def fix_exif_rotation manipulate! do |img| img.tap(&:auto_orient) end end end and use_processor in Uploader class SomeUploader < CarrierWave::Uploader::Base use_processor :image, :if => :image? def image? m # ... end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
carrierwave-processor-1.1.2 | README.md |
carrierwave-processor-1.1.1 | README.md |
carrierwave-processor-1.1.0 | README.md |
carrierwave-processor-1.0.3 | README.md |