Class: IshManager::EmailAttachmentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ish_manager/email_attachments_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#basic_auth, #home, #tinymce

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
# File 'app/controllers/ish_manager/email_attachments_controller.rb', line 4

def show
  att = Office::EmailAttachment.find params[:id]
  authorize! :show, att
  send_data(
    att.content,
    filename: att.filename || "this_download",
    type: att.content_type )
end