Fix update when no tag or category

This commit is contained in:
chris 2013-03-07 17:30:49 +08:00
parent 27686a5d04
commit 147b7b9292
1 changed files with 4 additions and 4 deletions

View File

@ -93,14 +93,14 @@ helper Admin::PagePartsHelper
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
end
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
params[:page][:frontend_field_type] = nil
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
params[:page][:frontend_field_type] = nil
if params[:page][:tag].include?("nil")
if params[:page][:tag] && params[:page][:tag].include?("nil")
params[:page][:tag] = []
end
if params[:page][:category].include?("nil")
if params[:page][:category] && params[:page][:category].include?("nil")
params[:page][:category] = []
end