Fix page part kind being removed

This commit is contained in:
chris 2013-01-29 22:17:00 +08:00
parent 774599a9f2
commit e9f2983176
1 changed files with 5 additions and 7 deletions

View File

@ -61,9 +61,7 @@ class Admin::PagePartsController < ApplicationController
if params[:page_part][:module_app].blank? if params[:page_part][:module_app].blank?
params[:page_part][:module_app] = nil params[:page_part][:module_app] = nil
params[:page_part][:kind] = nil
end end
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')