execute check only when first load
This commit is contained in:
parent
a6aff16099
commit
4cb636d8b2
|
@ -1,7 +1,7 @@
|
|||
class ArchivesController < ApplicationController
|
||||
def index
|
||||
#avoid the categories to be not in the ArchiveCategory
|
||||
check_cat_sort_data()
|
||||
#avoid the categories to be not in the ArchiveCategory
|
||||
check_cat_sort_data()
|
||||
def index
|
||||
if ArchiveSortOrder.count == 0
|
||||
ArchiveSortOrder.new('sort_order' => false).save
|
||||
end
|
||||
|
@ -264,7 +264,6 @@ F cats = files_by_cateogry.keys.collect do |cat|
|
|||
end
|
||||
|
||||
def widget
|
||||
check_cat_sort_data()
|
||||
if ArchiveSortOrder.count == 0
|
||||
ArchiveSortOrder.new('sort_order' => false).save
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue