Sha256: 9732deea4430f4a172ed27c4dcf92d3d969b127d53393bdd02955bf2630cfeb2

Contents?: true

Size: 344 Bytes

Versions: 15

Compression:

Stored size: 344 Bytes

Contents

# encoding: utf-8

module Locomotive
  class PictureUploader < ::CarrierWave::Uploader::Base

    include ::CarrierWave::MimeTypes

    def extension_white_list
      %w(jpg jpeg gif png)
    end

    def image?
      self.file.try(:exists?)
    end

    def store_dir
      self.build_store_dir('uploaded_assets', model.id)
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms-3.3.0 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.3.0.rc3 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.3.0.rc2 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.1.2 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.2.1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.3.0.rc1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.2.0 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.2.0.rc2 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.2.0.rc1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.1.1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.1.0 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.1.0.rc3 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.1.0.rc2 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.1.0.rc1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-3.0.1 app/uploaders/locomotive/picture_uploader.rb