From fa6587265f6697ab5b239656744777471144dd29 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 1 Nov 2019 17:40:33 +0800 Subject: [PATCH] Update page_contents_controller.rb,to delete the extra fields when editing the page_contents --- app/controllers/admin/page_contents_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/page_contents_controller.rb b/app/controllers/admin/page_contents_controller.rb index 60e7092..9c781b9 100644 --- a/app/controllers/admin/page_contents_controller.rb +++ b/app/controllers/admin/page_contents_controller.rb @@ -33,6 +33,7 @@ class Admin::PageContentsController < OrbitAdminController end def create + PageContext.where("page_id" => params["page_context"]["page_id"]).destroy_all @page_content = PageContext.new(update_params) @page_content.update_user_id = current_user.id @page_content.save