From e3104a83b40912f77987d80ebe006ea7a427fd40 Mon Sep 17 00:00:00 2001 From: Godwin Date: Thu, 8 Nov 2018 07:04:43 -0800 Subject: [PATCH] Another fix for stats --- app/controllers/conference_administration_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/conference_administration_controller.rb b/app/controllers/conference_administration_controller.rb index 13af7fc..8e4f14b 100644 --- a/app/controllers/conference_administration_controller.rb +++ b/app/controllers/conference_administration_controller.rb @@ -342,9 +342,8 @@ class ConferenceAdministrationController < ApplicationController end def administrate_stats - get_stats(!request.format.xlsx?) - if request.format.xlsx? + get_stats logger.info "Generating stats.xls" return respond_to do |format| format.xlsx { render xlsx: '../conferences/stats', filename: "stats-#{DateTime.now.strftime('%Y-%m-%d')}" } @@ -360,6 +359,8 @@ class ConferenceAdministrationController < ApplicationController return end + get_stats(true) + @registration_count = @registrations.size @completed_registrations = 0 @bikes = 0