diff --git a/app/controllers/olympiamanagements_controller.rb b/app/controllers/olympiamanagements_controller.rb index 31dbb44..d7981fc 100644 --- a/app/controllers/olympiamanagements_controller.rb +++ b/app/controllers/olympiamanagements_controller.rb @@ -1,6 +1,7 @@ class OlympiamanagementsController < ApplicationController include ActionView::Context #vary important (only add this can access @@session from view) - before_action :set_sign_up_setting,:create_first_fields,:check_time + before_action :set_sign_up_setting,:create_first_fields + before_action :check_time , except=>[:index,:download_school_code] prepend_view_path "app/templates" #for_render_pages layout :get_layout #for_render_pages helper Admin::OlympiamanagementsHelper diff --git a/app/views/olympiamanagements/_school_code.xlsx.axlsx b/app/views/olympiamanagements/_school_code.xlsx.axlsx index 599ae0f..9deaf14 100644 --- a/app/views/olympiamanagements/_school_code.xlsx.axlsx +++ b/app/views/olympiamanagements/_school_code.xlsx.axlsx @@ -22,6 +22,6 @@ wb.add_worksheet(name: "school_class") do |sheet| #export data end sheet.add_row row , :style=> title,:widths => row.map{|cell| (cell.length* 11/ 2).round} export_data_rows.each do |infos_row| - sheet.add_row infos_row , :style=> column + sheet.add_row infos_row , :style=> column , :types => :string end end \ No newline at end of file