From 46f68c5823f76c41b7827be84632329a7b94dbbf Mon Sep 17 00:00:00 2001 From: Michael Herzberg Date: Fri, 22 Feb 2019 01:14:37 +0000 Subject: [PATCH] Use normal public serve for reports. --- app/controllers/reports_controller.rb | 4 ---- config/routes.rb | 2 -- 2 files changed, 6 deletions(-) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index bbe09b1..cbd501f 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -13,8 +13,4 @@ class ReportsController < ApplicationController kick_out end end - - def show - send_file File.read(@@report_dir.join(params[:filename])) - end end diff --git a/config/routes.rb b/config/routes.rb index 86df04a..e4fabc1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,9 +15,7 @@ Rails.application.routes.draw do resources :grades, only: [:new, :create, :index, :edit, :update] - get '/reports/:filename', to: 'reports#show' post '/reports', to: 'reports#create' - root to: "welcome#index" end