Sha256: f24d030923ae3fe2d843cec80a48c808b8ec57b6807774d4e5cdd4481de80299

Contents?: true

Size: 252 Bytes

Versions: 3

Compression:

Stored size: 252 Bytes

Contents

module Spotlight
  class Attachment < ActiveRecord::Base
    mount_uploader :file, 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

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-0.0.3 app/models/spotlight/attachment.rb
blacklight-spotlight-0.0.2 app/models/spotlight/attachment.rb
blacklight-spotlight-0.0.1 app/models/spotlight/attachment.rb