fix error
This commit is contained in:
parent
4350d4e8ed
commit
aebc498144
|
@ -1,5 +1,5 @@
|
||||||
class ArchivesController < ApplicationController
|
class ArchivesController < ApplicationController
|
||||||
def check_cat_sort_data
|
#avoid the categories to be not in the ArchiveCategory
|
||||||
categories_temp = ModuleApp.where(:key => "archive").first.categories
|
categories_temp = ModuleApp.where(:key => "archive").first.categories
|
||||||
categories_temp.each do |category|
|
categories_temp.each do |category|
|
||||||
archive_cat = ArchiveCategory.where(:category_id => category.id)
|
archive_cat = ArchiveCategory.where(:category_id => category.id)
|
||||||
|
@ -7,9 +7,6 @@ class ArchivesController < ApplicationController
|
||||||
ArchiveCategory.create(category_id: category.id.to_s)
|
ArchiveCategory.create(category_id: category.id.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
#avoid the categories to be not in the ArchiveCategory
|
|
||||||
check_cat_sort_data()
|
|
||||||
def index
|
def index
|
||||||
if ArchiveSortOrder.count == 0
|
if ArchiveSortOrder.count == 0
|
||||||
ArchiveSortOrder.new('sort_order' => false).save
|
ArchiveSortOrder.new('sort_order' => false).save
|
||||||
|
|
Loading…
Reference in New Issue