Fix page part update when no tag or category

This commit is contained in:
chris 2013-03-07 17:30:49 +08:00
parent b864cc0268
commit e208e99a73
1 changed files with 3 additions and 3 deletions

View File

@ -65,11 +65,11 @@ class Admin::PagePartsController < ApplicationController
params[:page_part][:module_app] = nil
end
if params[:page_part][:tag].include?("nil")
if params[:page_part][:tag] && params[:page_part][:tag].include?("nil")
params[:page_part][:tag] = []
end
if params[:page_part][:category].include?("nil")
if params[:page_part][:category] && params[:page_part][:category].include?("nil")
params[:page_part][:category] = []
end