Sha256: 5ce75a64fcf923e292f517eec1d5f9f51d4d8e5b6b36d158e63c1fee93d91723

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 Bytes

Contents

module C80Catoffers

  # грузит картинку услуги
  class OphotoUploader < BaseFileUploader

    process :resize_to_limit => [1024,768]

    version :thumb_big_one do
      Proc.new {
        p = C80Catoffers::Prop.first
        process :resize_to_fill => [p.big_one_width, p.big_one_height]
      }
    end

    version :thumb_preview do
      Proc.new {
        p = C80Catoffers::Prop.first
        process :resize_to_fill => [p.preview_width, p.preview_height]
      }
    end

    version :thumb_sm do
      Proc.new {
        p = C80Catoffers::Prop.first
        process :resize_to_fill => [p.thumb_sm_width, p.thumb_sm_height]
      }
    end

    def store_dir
      'uploads/oimages'
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
c80_catoffers-0.1.0.2 app/uploaders/c80_catoffers/ophoto_uploader.rb