fix data_count problem
This commit is contained in:
parent
9815866b16
commit
fd29da19e5
|
@ -1,5 +1,13 @@
|
||||||
class ArchivesController < ApplicationController
|
class ArchivesController < ApplicationController
|
||||||
def index
|
def index
|
||||||
|
if OrbitHelper.page_data_count > 0
|
||||||
|
OrbitHelper.set_page_data_count 0
|
||||||
|
page = Page.where(:page_id => OrbitHelper.params["page_id"]).first rescue nil
|
||||||
|
if !page.nil?
|
||||||
|
page.data_count = 0
|
||||||
|
page.save
|
||||||
|
end
|
||||||
|
end
|
||||||
files_by_cateogry = ArchiveFile.filter_by_categories.filter_by_tags.group_by(&:category)
|
files_by_cateogry = ArchiveFile.filter_by_categories.filter_by_tags.group_by(&:category)
|
||||||
categories = files_by_cateogry.keys
|
categories = files_by_cateogry.keys
|
||||||
cats = categories.collect do |category|
|
cats = categories.collect do |category|
|
||||||
|
|
Loading…
Reference in New Issue