From 09bb492e837040a904ae5f6172078fdab27d0386 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 13 Aug 2019 09:48:28 +0800 Subject: [PATCH] Update personal_journals_controller.rb --- app/controllers/personal_journals_controller.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 613fe13..9cc3847 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -20,11 +20,11 @@ class PersonalJournalsController < ApplicationController "paper_title" ] end - #if params.selectbox !=nil - # 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) - #else + if params[:selectbox] !=nil + 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) + else journal_paper_list = [] journal_papers.each do |journal_paper| t = [] @@ -48,7 +48,7 @@ class PersonalJournalsController < ApplicationController end journal_paper_list << {"jps" => t} end - #end + end headers = [] choice_show = [] fields_to_show.each do |fs|