Sha256: d1df255fddde77b21a1111ac26f437d7e92df2886fb341865b92418671d18abc

Contents?: true

Size: 1.03 KB

Versions: 24

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

24 entries across 24 versions & 1 rubygems

Version Path
effective_assets-1.12.2 app/uploaders/test_asset_uploader.rb
effective_assets-1.12.1 app/uploaders/test_asset_uploader.rb
effective_assets-1.12.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.11.5 app/uploaders/test_asset_uploader.rb
effective_assets-1.11.4 app/uploaders/test_asset_uploader.rb
effective_assets-1.11.3 app/uploaders/test_asset_uploader.rb
effective_assets-1.11.2 app/uploaders/test_asset_uploader.rb
effective_assets-1.11.1 app/uploaders/test_asset_uploader.rb
effective_assets-1.11.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.10.1 app/uploaders/test_asset_uploader.rb
effective_assets-1.10.0 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.14 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.13 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.12 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.11 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.10 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.9 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.8 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.7 app/uploaders/test_asset_uploader.rb
effective_assets-1.9.6 app/uploaders/test_asset_uploader.rb