Sha256: 3b80a63e0eeac1c4e67d8132826449a722cc076577b9dc3c04d7d478ae0f54a5

Contents?: true

Size: 351 Bytes

Versions: 30

Compression:

Stored size: 351 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  ##
  # Sir-trevor image upload attachments
  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

30 entries across 30 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.rc4 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.rc3 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.rc2 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.rc1 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.10 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.9 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.8 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.7 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.6 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.5 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.4 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.3 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.2 app/models/spotlight/attachment.rb
blacklight-spotlight-3.0.0.alpha.1 app/models/spotlight/attachment.rb
blacklight-spotlight-2.13.0 app/models/spotlight/attachment.rb
blacklight-spotlight-2.12.1 app/models/spotlight/attachment.rb
blacklight-spotlight-2.12.0 app/models/spotlight/attachment.rb
blacklight-spotlight-2.11.0 app/models/spotlight/attachment.rb
blacklight-spotlight-2.10.0 app/models/spotlight/attachment.rb
blacklight-spotlight-2.9.0 app/models/spotlight/attachment.rb