Sha256: d689ba3d4294d34f07623369cf9d182322099df88d412ca81e6bf23ea3723989

Contents?: true

Size: 364 Bytes

Versions: 8

Compression:

Stored size: 364 Bytes

Contents

# Set correct paths
module CustomFields
  module Types
    module File
      class FileUploader < ::CarrierWave::Uploader::Base

        def store_dir
          "sites/#{model.site_id}/contents/#{model.class.model_name.underscore}/#{model.id}/files"
        end

        def cache_dir
          "#{Rails.root}/tmp/uploads"
        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotive_cms-1.0.0.beta.2 lib/locomotive/custom_fields.rb
locomotive_cms-1.0.0.beta lib/locomotive/custom_fields.rb
locomotive_cms-0.0.4.beta12 lib/locomotive/custom_fields.rb
locomotive_cms-0.0.4.beta11 lib/locomotive/custom_fields.rb
locomotive_cms-0.0.4.beta10 lib/locomotive/custom_fields.rb
locomotive_cms-0.0.4.beta9 lib/locomotive/custom_fields.rb
locomotive_cms-0.0.4.beta8 lib/locomotive/custom_fields.rb
locomotive_cms-0.0.4.beta7 lib/locomotive/custom_fields.rb