Sha256: dbef399b64b717f2235d9af306ded211a692009dbb0dce9cb562c31092dbd1d6

Contents?: true

Size: 345 Bytes

Versions: 39

Compression:

Stored size: 345 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, attachment: to_global_id)
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
blacklight-spotlight-4.2.0 app/models/spotlight/attachment.rb
blacklight-spotlight-4.1.2 app/models/spotlight/attachment.rb
blacklight-spotlight-4.1.1 app/models/spotlight/attachment.rb
blacklight-spotlight-4.1.0 app/models/spotlight/attachment.rb
blacklight-spotlight-4.0.3 app/models/spotlight/attachment.rb
blacklight-spotlight-4.0.2 app/models/spotlight/attachment.rb
blacklight-spotlight-4.0.1 app/models/spotlight/attachment.rb
blacklight-spotlight-4.0.0 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta10 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta9 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta8 app/models/spotlight/attachment.rb
blacklight-spotlight-3.5.0.4 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta7 app/models/spotlight/attachment.rb
blacklight-spotlight-3.5.0.3 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta6 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta5 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta4 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta3 app/models/spotlight/attachment.rb
blacklight-spotlight-3.6.0.beta1 app/models/spotlight/attachment.rb
blacklight-spotlight-3.5.0.2 app/models/spotlight/attachment.rb