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