added date

This commit is contained in:
Harry Bomrah 2017-05-26 16:13:15 +08:00
parent fd8ab30831
commit 9d42443a29
1 changed files with 2 additions and 1 deletions

View File

@ -45,8 +45,9 @@ class MemberCounselorsController < CUserController
page = Page.where(:page_id => params[:page_id]).first page = Page.where(:page_id => params[:page_id]).first
files = [] files = []
members.each do |member| members.each do |member|
member.hps_files.each do |file| member.hps_files.desc(:created_at).each do |file|
files << { files << {
"date" => file.created_at.strftime("%Y/%m/%d"),
"title" => file.title, "title" => file.title,
"download_count" => file.download_count, "download_count" => file.download_count,
"url" => "/cuser/download?file_id=#{file.id.to_s}" "url" => "/cuser/download?file_id=#{file.id.to_s}"