Update personal_journals_controller.rb

This commit is contained in:
chiu 2019-08-14 14:48:01 +08:00
parent 71940517fc
commit 61d3fe5a52
1 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class PersonalJournalsController < ApplicationController
]
end
if params[:selectbox] !=nil
journal_papers = JournalPaper.where(:is_hidden=>false)#Mongoid::Sessions.default[:journal_papers].find()
journal_papers = JournalPaper.where(:is_hidden=>false)
journal_papers_count = journal_papers.count
journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
case params[:selectbox]
@ -106,7 +106,8 @@ class PersonalJournalsController < ApplicationController
"search_text" => search_text,
"search_value" => params[:keywords]},
"total_pages" => journal_papers_total_pages,
"choice" => choice
"choice" => choice,
"trans" => [I18n.t("我me"),I18n,t(nil)]
}
end