From 4ec2479d21ae417b1786132b48f5b6d034046fdc Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 1 Nov 2019 22:17:33 +0800 Subject: [PATCH] Update journal_papers_controller.rb --- app/controllers/admin/journal_papers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb index d878883..dcad123 100644 --- a/app/controllers/admin/journal_papers_controller.rb +++ b/app/controllers/admin/journal_papers_controller.rb @@ -28,7 +28,7 @@ class Admin::JournalPapersController < OrbitMemberController def merge @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 + if value.length<=1 @journals.delete key end end