This commit is contained in:
chiu committed 2023-11-07 07:59:49 +08:00
1 parent 4ac9278f56
commit c3973df78c
3 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -20,9 +20,9 @@ class AskCategorySetting
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
need_recalc_sort = true
end
if need_recalc_sort
self.recalc_sort(false)
end
# if need_recalc_sort
self.recalc_sort(false)
# end
end
true
end
+3 -3
View File
@@ -22,9 +22,9 @@ class AskSetting
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
need_recalc_sort = true
end
if need_recalc_sort
self.recalc_sort(false)
end
# if need_recalc_sort
self.recalc_sort(false)
# end
true
end
after_save do
+2 -2
View File
@@ -6,7 +6,7 @@ Rails.application.routes.draw do
s = OrbitHelper::SharedHash['current_site']['site'] rescue Site.first
update_flag = s.respond_to?(:tmp_flags)
need_update = !update_flag || !(s.tmp_flags.include?('askf1'))
need_update2 = !update_flag || !(s.tmp_flags.include?('askf2'))
need_update2 = !update_flag || !(s.tmp_flags.include?('askf3'))
if need_update
ask_setting = AskSetting.first
check_custom_fields = {}
@@ -52,7 +52,7 @@ Rails.application.routes.draw do
a.migrate_old
end
if update_flag
Site.update_all("$push"=>{"tmp_flags"=>'askf2'})
Site.update_all("$push"=>{"tmp_flags"=>'askf3'})
end
end
end