From 7883047002244afc10cb9266eb977c7022f74f6d Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 1 Nov 2019 00:38:33 +0800 Subject: [PATCH] Update journal_papers_controller.rb --- app/controllers/admin/journal_papers_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb index a4cd576..92daf07 100644 --- a/app/controllers/admin/journal_papers_controller.rb +++ b/app/controllers/admin/journal_papers_controller.rb @@ -13,7 +13,7 @@ class Admin::JournalPapersController < OrbitMemberController @journals=JournalPaper.order_by(:year=>'desc').map{|value| value}.group_by{|v| [v[:paper_title],v[:journal_title]]} @journals.each do |key,value| if value.length==1 - @journals.except! key + @journals.delete key end end #journals = JournalPaper.order_by(:year=>'desc').map{|value| value} @@ -32,10 +32,10 @@ class Admin::JournalPapersController < OrbitMemberController #end if params['mode']!='simple' @journals.each do |key,value| - value = value.group_by{|v| [get_level_type(v),get_author_type(v),get_paper_type(v),get_publication_date(v)]} - value.each do |key1,value1| + @journals[key] = value.group_by{|v| [get_level_type(v),get_author_type(v),get_paper_type(v),get_publication_date(v)]} + @journals[key].each do |key1,value1| if value1.length==1 - value.except! key1 + value.delete key1 end end end