From 208c1b2d9bfa1a2dc6eaa1b0a9ca080efdc905e1 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 1 Nov 2019 22:19:37 +0800 Subject: [PATCH] Update journal_papers_controller.rb --- app/controllers/admin/journal_papers_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb index dcad123..4c57273 100644 --- a/app/controllers/admin/journal_papers_controller.rb +++ b/app/controllers/admin/journal_papers_controller.rb @@ -54,7 +54,11 @@ class Admin::JournalPapersController < OrbitMemberController @journals[key].delete key1 end end + if @journals[key].length==0 + @journals.delete key + end end + end end def index