Fix bug.
This commit is contained in:
parent
23677b4798
commit
591399eaba
|
|
@ -47,7 +47,7 @@ class Admin::RulingTimersController < OrbitMemberController
|
||||||
end
|
end
|
||||||
def timer_management
|
def timer_management
|
||||||
@timer_temps = RulingTimerTemp.all.page(params[:page]).per(15)
|
@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
|
end
|
||||||
def task_management
|
def task_management
|
||||||
@tasks = RulingTimerTask.all.desc(:created_at).page(params[:page]).per(10)
|
@tasks = RulingTimerTask.all.desc(:created_at).page(params[:page]).per(10)
|
||||||
|
|
|
||||||
|
|
@ -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.title_translations = I18n.available_locales.map{|l| [l.to_s,I18n.with_locale(l){I18n.t("ruling_timer.personal_project")}]}.to_h
|
||||||
category.save
|
category.save
|
||||||
end
|
end
|
||||||
|
RulingTimerTemp.all.to_a.each do |t|
|
||||||
|
if t.user.nil?
|
||||||
|
t.destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
puts e.to_s
|
puts e.to_s
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue