Fix missing params category value
This commit is contained in:
parent
0ab7041341
commit
eb638995f0
|
@ -103,6 +103,8 @@ class Admin::PagePartsController < OrbitBackendController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@part = PagePart.find(params[:id])
|
@part = PagePart.find(params[:id])
|
||||||
|
# Sometimes category is passed into params[:page], so this line makes sure it will also be in params[:page_part] too
|
||||||
|
params[:page_part][:category] ||= params[:page][:category]
|
||||||
if @part.update_attributes(params[:page_part])
|
if @part.update_attributes(params[:page_part])
|
||||||
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
||||||
flash.now[:notice] = t('update.success.content')
|
flash.now[:notice] = t('update.success.content')
|
||||||
|
|
Loading…
Reference in New Issue