From a8db77e659fed54bd06248137f0215cb67c6114c Mon Sep 17 00:00:00 2001 From: chiu Date: Mon, 19 Aug 2019 15:12:50 +0800 Subject: [PATCH] Update journal_paper.rb try destroy --- app/models/journal_paper.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index 0152181..fdabd5e 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -159,13 +159,13 @@ class JournalPaper # member_data.to_json # end - # def save_journal_paper_files - # self.journal_paper_files.each do |t| - # if t.should_destroy - # t.destroy - # end - # end - # end + def save_journal_paper_files + self.journal_paper_files.each do |t| + if t.should_destroy + t.destroy + end + end + end # def save_journal_paper_authors # self.journal_paper_authors.each do |t|