Sha256: 24eb26c9106bcec3c3ec91925864f33f3f2c0b3fa58f0cc285f202ccae072932

Contents?: true

Size: 1.03 KB

Versions: 53

Compression:

Stored size: 1.03 KB

Contents

class TestAssetUploader < EffectiveAssetsUploader
  # resize_to_fit
  # Resize the image to fit within the specified dimensions while retaining the
  # original aspect ratio. The image may be shorter or narrower than specified in the smaller dimension
  # but will not be larger than the specified values.
  #
  # Probably best for taking a big image and making it smaller.
  # Keeps the aspect ratio
  # An uploaded image that is smaller will not be made bigger.

  # resize_to_fill
  # Resize the image to fit within the specified dimensions while retaining the
  # aspect ratio of the original image. If necessary, crop the image in the larger dimension.

  # resize_to_limit
  # http://stackoverflow.com/questions/8570181/carrierwave-resizing-images-to-fixed-width
  # Keep in mind, resize_to_fit will scale up images if they are smaller than 100px.
  # If you don't want it to do that, then replace that with resize_to_limit.

  version :thumb, :if => :image? do
    process :resize_to_fit => [70, 70]
    process :record_info => :thumb
  end

end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
effective_assets-1.9.1 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.8.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.7 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.6 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.5 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.4 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.3 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.2 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.1 app/uploaders/test_asset_uploader.rb
effective_assets-1.7.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.9 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.8 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.7 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.6 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.5 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.4 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.3 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.2 app/uploaders/test_asset_uploader.rb
effective_assets-1.6.1 app/uploaders/test_asset_uploader.rb