Skip to content
Permalink
Browse files

Adding array support for values in custom_field_hash

  • Loading branch information...
Olivier Ferlin
Olivier Ferlin committed Mar 3, 2009
1 parent 474688f commit 9c0a9fd3c3f45d441c454d845e3d12a1586d6c5c
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/campaign_monitor/list.rb
@@ -138,7 +138,13 @@ def bounced(date)
def custom_fields_array(custom_fields)
arr = []
custom_fields.each do |key, value|
arr << { "Key" => key, "Value" => value }
if value.is_a? Array
value.each do |array_value|
arr << { "Key" => key, "Value" => array_value }
end
else
arr << { "Key" => key, "Value" => value }
end
end
arr
end

0 comments on commit 9c0a9fd

Please sign in to comment.
You can’t perform that action at this time.