Class: DocumentsController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

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

Instance Method Details

#showObject


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

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