Sha256: e2728790dde4fa9ae0c0884383eeac4588d87dc2b9af16e9244d1f6b6c7d6d71

Contents?: true

Size: 642 Bytes

Versions: 12

Compression:

Stored size: 642 Bytes

Contents

# encoding: utf-8
module Spotlight
  ##
  # Exhibit and browse category custom mastheads
  class MastheadUploader < CarrierWave::Uploader::Base
    include CarrierWave::MiniMagick
    storage Spotlight::Engine.config.uploader_storage

    version :cropped do
      process crop: :image ## Crops this version based on original image
      process resize_to_fill: [1800, 180]
    end

    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end

    def default_url
      ActionController::Base.helpers.image_path('spotlight/fallback/' + [version_name, 'default.png'].compact.join('_'))
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
blacklight-spotlight-0.32.0 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.31.0 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.30.0 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.29.1 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.29.0 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.28.3 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.28.2 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.28.1 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.28.0 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.27.0 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.26.1 app/uploaders/spotlight/masthead_uploader.rb
blacklight-spotlight-0.26.0 app/uploaders/spotlight/masthead_uploader.rb