Sha256: 1b3da807a30edbcf535a68e9dc36e49d2dfe04177f30348ec351d1db463ea507

Contents?: true

Size: 271 Bytes

Versions: 5

Compression:

Stored size: 271 Bytes

Contents

class AttachmentsController <  ApplicationController
  def show
    attachment = Attachment.find params[:id]

    send_data attachment.file_data,
      type:         attachment.content_type,
      filename:     attachment.filename,
      disposition:  'inline'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tawork-0.0.5 app/controllers/attachments_controller.rb
tawork-0.0.4 app/controllers/attachments_controller.rb
tawork-0.0.3 app/controllers/attachments_controller.rb
tawork-0.0.2 app/controllers/attachments_controller.rb
tawork-0.0.1 app/controllers/attachments_controller.rb