Sha256: 3534a39faa8224986cc472ff16cedac6255dca63cdedb3d42c9b0c7f0ae3859d

Contents?: true

Size: 479 Bytes

Versions: 43

Compression:

Stored size: 479 Bytes

Contents

class Pulitzer::ImageUploader < Pulitzer::BaseUploader

  self.aws_acl = Pulitzer.aws_acl if self.respond_to? :aws_acl

  include CarrierWave::MiniMagick

  version :cms, if: :version_available? do
    process :dynamic_resize
  end

  version :thumb, if: :version_available? do
    process resize_to_fill: [200,200]
  end

  def dynamic_resize
    resize_to_fit model.width, model.height
  end

  def version_available? photo
    true
    # !model.version_unavailable
  end

end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
pulitzer-0.4.9 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.8 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.7 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.6 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.5 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.4 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.3 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.2 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.1 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.0 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.9 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.8 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.7 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.6 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.5 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.4 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.3 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.2 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.1 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.3.0 app/uploaders/pulitzer/image_uploader.rb