make custom fields a bit more permissive input wise

This commit is contained in:
Sam 2015-02-06 09:03:23 +11:00
parent a852f6c56f
commit 3a0cd0b760
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class UsersController < ApplicationController
guardian.ensure_can_edit!(user)
if params[:user_fields].present?
params[:custom_fields] ||= {}
params[:custom_fields] = {} unless params[:custom_fields].present?
UserField.where(editable: true).each do |f|
val = params[:user_fields][f.id.to_s]
val = nil if val === "false"