From 25116235bfab162f75dcd3983a6b38e0b2ab7657 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 13 Aug 2019 09:57:06 +0800 Subject: [PATCH] Update personal_journals_controller.rb --- app/controllers/personal_journals_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index efe0d9d..a6dc9e8 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -24,6 +24,7 @@ class PersonalJournalsController < ApplicationController journal_papers = Mongoid::Sessions.default[:journal_papers].find() journal_papers_count = journal_papers.count journal_papers_temp = Mongoid::Sessions.default[:journal_papers].find().take(journal_papers_count) + journal_papers_show = journal_papers_temp.select (|value| value[params[:selectbox]].include? params[:keywords]) else journal_paper_list = [] journal_papers.each do |journal_paper| @@ -48,7 +49,7 @@ class PersonalJournalsController < ApplicationController end journal_paper_list << {"jps" => t} end - end + headers = [] choice_show = [] fields_to_show.each do |fs| @@ -73,6 +74,10 @@ class PersonalJournalsController < ApplicationController "url" => "/"+params[:locale]+params[:url], "all" => journal_papers_temp } + end + { + "all" => journal_papers_show + } end def show