internetee-registry/app/controllers/admin/legal_documents_controller.rb
2017-08-22 01:17:50 +03:00

11 lines
274 B
Ruby

module Admin
class LegalDocumentsController < BaseController
load_and_authorize_resource
def show
@ld = LegalDocument.find(params[:id])
filename = @ld.path.split('/').last
send_data File.open(@ld.path).read, filename: filename
end
end
end