Sha256: 0041c695bc072126fa922800b9ad85c777331cf4dead8579ac1be5f85238834e

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 Bytes

Contents

# загрузка иконок в блоки "о нас"
class C80Features::ParaUploader < CarrierWave::Uploader::Base

  include CarrierWave::MiniMagick

  storage :file

  def store_dir
    "uploads/features"
  end

  def filename
    if original_filename
      "photo_#{model.id}.#{file.extension}"
    end
  end

  # TODO:: размеры картинок вынести в отдельную модель Props

  process :resize_to_limit => [121,107]

  version :thumb_fill do
    process :resize_to_fill => [121,107]
  end

  version :thumb_fit do
    process :resize_to_fit => [121,107]
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
c80_features-0.1.3 app/uploaders/c80_features/para_uploader.rb
c80_features-0.1.2 app/uploaders/c80_features/para_uploader.rb
c80_features-0.1.1 app/uploaders/c80_features/para_uploader.rb
c80_features-0.1.0 app/uploaders/c80_features/para_uploader.rb