Class: DocumentsController

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

Overview

rubocop:todo Style/Documentation

Constant Summary

Constants included from FlashTruncation

FlashTruncation::STRING_OVERHEAD

Instance Method Summary collapse

Methods inherited from ApplicationController

#block_api_access, #evil_parameter_hack!, #extract_header_info, #set_cache_disabled!

Methods included from FlashTruncation

#max_flash_size, #truncate_flash, #truncate_flash_array

Instance Method Details

#showObject


3
4
5
6
# File 'app/controllers/documents_controller.rb', line 3

def show
  @document = Document.find(params[:id])
  send_data @document.current_data, filename: @document.filename, type: @document.content_type, disposition: 'inline'
end