diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index 605b3419..74377fa1 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -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')