brewster / vcardigan

Ruby vCard Builder/Parser
MIT License
71 stars 23 forks source link

Fix array values for params #15

Closed bdmac closed 4 years ago

bdmac commented 8 years ago

Your example shows that vcard.email 'joe@strummer.com', :type => ['work', 'internet'], :preferred => 1 should turn into EMAIL;TYPE=work,internet;PREF=1:joe@strummer.com but in my testing it actually outputs EMAIL;TYPE=["work", "internet"];PREF=1:joe@strummer.com which is not valid. This just adds a check for array hash values and joins them with ',' to match the expectation of the examples and output valid vcards (at least for this use-case). I'm not an expert at vcard formats so I do not know if this causes any problems with other use-cases.

ghost commented 7 years ago

Hallo, thank you for the patch. I got the same problem when I parse a vcard, can you assist where I should change the code?