Sha256: 4dc89bbc4312376d325e81701aaddf503d34699570e786e8ce61dfee383e6091

Contents?: true

Size: 350 Bytes

Versions: 8

Compression:

Stored size: 350 Bytes

Contents

module Ecom
  module Core
    class PhotoUploader < CarrierWave::Uploader::Base
      storage :file

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

      def extension_whitelist
        %w[jpg jpeg gif png]
      end

      def filename
        original_filename
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ecom_core-1.2.33 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.32 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.31 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.30 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.29 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.28 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.27 app/uploaders/ecom/core/photo_uploader.rb
ecom_core-1.2.26 app/uploaders/ecom/core/photo_uploader.rb