Fix page part kind being removed
This commit is contained in:
parent
774599a9f2
commit
e9f2983176
|
@ -56,14 +56,12 @@ class Admin::PagePartsController < ApplicationController
|
|||
def update
|
||||
@part = PagePart.find(params[:id])
|
||||
|
||||
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field]
|
||||
params[:page_part][:widget_field_type] = nil
|
||||
|
||||
if params[:page_part][:module_app].blank?
|
||||
params[:page_part][:module_app] = nil
|
||||
params[:page_part][:kind] = nil
|
||||
end
|
||||
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field]
|
||||
params[:page_part][:widget_field_type] = nil
|
||||
|
||||
if params[:page_part][:module_app].blank?
|
||||
params[:page_part][:module_app] = nil
|
||||
end
|
||||
if @part.update_attributes(params[:page_part])
|
||||
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
||||
flash.now[:notice] = t('update.success.content')
|
||||
|
|
Reference in New Issue