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.6.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.9 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.8 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.7 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.6 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.5 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.4 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.3 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.2 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.1 app/uploaders/test_asset_uploader.rb
effective_assets-1.5.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.9 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.8 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.7 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.6 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.5 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.4 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.3 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.2 app/uploaders/test_asset_uploader.rb
effective_assets-1.4.1 app/uploaders/test_asset_uploader.rb