Sha256: ae5d273ac4c19d508d70761b14adf1927feed562b9d50293d1340cf852d1d60d

Contents?: true

Size: 416 Bytes

Versions: 3

Compression:

Stored size: 416 Bytes

Contents

module FileUpload
  module RedisFileReadable
    extend ActiveSupport::Concern

    included do
      attr_reader :key
      attr_accessor :copy_from
    end

    def key=(key)
      @key = key
      if redis_file = RedisFile.find(key)
        self.data = redis_file.data
        self.name = redis_file.name
        self.content_type = redis_file.type
        self.size = redis_file.size
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
file_upload-0.0.3 app/models/file_upload/redis_file_readable.rb
file_upload-0.0.2 app/models/file_upload/redis_file_readable.rb
file_upload-0.0.1 app/models/file_upload/redis_file_readable.rb