Sha256: 1d4663fc043f38a797b16ac6b26e78250c6c541de57d80923c4c00154ef701cd

Contents?: true

Size: 287 Bytes

Versions: 4

Compression:

Stored size: 287 Bytes

Contents

module Spotlight
  class Attachment < ActiveRecord::Base
    belongs_to :exhibit
    mount_uploader :file, Spotlight::AttachmentUploader

    def as_json(options = nil)
      file.as_json(options).merge(:name => name, :uid => uid, :id => id, :class => self.class.to_s)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 app/models/spotlight/attachment.rb
blacklight-spotlight-0.3.1 app/models/spotlight/attachment.rb
blacklight-spotlight-0.3.0 app/models/spotlight/attachment.rb
blacklight-spotlight-0.2.0 app/models/spotlight/attachment.rb