Fix missing params category value

This commit is contained in:
Bernie Chiu authored and saurabhbhatia committed 2013-12-13 16:19:19 +08:00
1 parent 0ab7041341
commit eb638995f0
1 file changed
+2
@@ -103,6 +103,8 @@ class Admin::PagePartsController < OrbitBackendController
def update
@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])
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
flash.now[:notice] = t('update.success.content')