This commit is contained in:
BoHung Chiu 2023-08-22 21:45:44 +08:00
parent 23677b4798
commit 591399eaba
2 changed files with 6 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class Admin::RulingTimersController < OrbitMemberController
end
def timer_management
@timer_temps = RulingTimerTemp.all.page(params[:page]).per(15)
@active_users = @timer_temps.map{|t| t.user}
@active_users = @timer_temps.map{|t| t.user}.compact
end
def task_management
@tasks = RulingTimerTask.all.desc(:created_at).page(params[:page]).per(10)

View File

@ -51,6 +51,11 @@ Rails.application.routes.draw do
category.title_translations = I18n.available_locales.map{|l| [l.to_s,I18n.with_locale(l){I18n.t("ruling_timer.personal_project")}]}.to_h
category.save
end
RulingTimerTemp.all.to_a.each do |t|
if t.user.nil?
t.destroy
end
end
rescue => e
puts e.to_s
end