From b70f60243e02c295c1134e7717dd858f24dfea32 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 13 Aug 2019 15:20:31 +0800 Subject: [PATCH] Update personal_journals_controller.rb --- app/controllers/personal_journals_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 743edfd..9828ef9 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -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]}