Sha256: d2753315015a576e5cc7f5242b0d63ab5fbd5c1bbae94a05c3ed3da71a295c83

Contents?: true

Size: 293 Bytes

Versions: 5

Compression:

Stored size: 293 Bytes

Contents

# encoding: utf-8

module Locomotive
  class PictureUploader < BaseUploader

    def extension_whitelist
      %w(jpg jpeg gif png tiff)
    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

5 entries across 5 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-4.2.0.alpha1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-4.1.1 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-4.1.0 app/uploaders/locomotive/picture_uploader.rb
locomotivecms-4.1.0.rc1 app/uploaders/locomotive/picture_uploader.rb