diff --git a/app/inputs/multi_value_input.rb b/app/inputs/multi_value_input.rb index 81871cd..659137f 100644 --- a/app/inputs/multi_value_input.rb +++ b/app/inputs/multi_value_input.rb @@ -74,11 +74,8 @@ def input_dom_id end def collection - @collection ||= begin - val = object.send(attribute_name) - col = val.respond_to?(:to_ary) ? val.to_ary : val - col.reject { |value| value.to_s.strip.blank? } + [''] - end + @collection ||= + Array(object.send(attribute_name)).reject { |v| v.to_s.strip.blank? } + [''] end def multiple?; true; end