Update personal_journals_controller.rb

This commit is contained in:
chiu 2019-08-13 15:20:31 +08:00
parent f811f12a43
commit b70f60243e
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class PersonalJournalsController < ApplicationController
]
end
if params[:selectbox] !=nil
journal_papers = Mongoid::Sessions.default[:journal_papers].find()
journal_papers = JournalPaper.where(:is_hidden=>false)#Mongoid::Sessions.default[:journal_papers].find()
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] }
journal_papers_show = journal_papers_temp.select {|value| value[params[:selectbox]][params[:locale]].include? params[:keywords]}