From f903aaed5917e43585f5016af61190d34dce852d Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Sun, 7 Oct 2018 18:03:53 +1100 Subject: [PATCH] ensure custom_value is not a blank string --- lib/builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/builder.rb b/lib/builder.rb index 4006b8cb..b158f288 100644 --- a/lib/builder.rb +++ b/lib/builder.rb @@ -287,7 +287,7 @@ class CustomWizard::Builder if action['add_fields'] action['add_fields'].each do |field| - value = field['value_custom'] ? field['value_custom'] : data[field['value']] + value = field['value_custom'].present? ? field['value_custom'] : data[field['value']] key = field['key'] if key && (value.present? || value === false)