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.5.13 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.11 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.10 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.9 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.8 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.7 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.6 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.5 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.4 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.3 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.2 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.1 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.5.0 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.16 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.15 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.14 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.13 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.12 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.11 app/uploaders/pulitzer/image_uploader.rb
pulitzer-0.4.10 app/uploaders/pulitzer/image_uploader.rb