Merge branch 'patch-1' into 'master'

Update page_contents_controller.rb,to delete the extra fields when editing the page_contents



See merge request !1
This commit is contained in:
wmcheng 2019-11-05 23:52:08 +08:00
commit 3b83d9854c
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class Admin::PageContentsController < OrbitAdminController
end end
def create def create
PageContext.where("page_id" => params["page_context"]["page_id"]).destroy_all
@page_content = PageContext.new(update_params) @page_content = PageContext.new(update_params)
@page_content.update_user_id = current_user.id @page_content.update_user_id = current_user.id
@page_content.save @page_content.save