The gem raises an exception when you try to save an existing contact which has no contact lists (e.g. one that is in the do-not-mail group).
> contact = ConstantContact::Contact.find(1)
=> #<ConstantContact::Contact:0x100000000 @prefix_options={}, @attributes={"Status"=>"Do Not Mail", ...
> contact.contact_lists
=> nil
> contact.save
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.sort
from .../lib/constant_contact/contact.rb:21:in `to_xml'
...
I'm new to Constant Contact, so perhaps you aren't allowed to update contacts that are in the do-not-mail group, but in that case there should be a more meaningful error. If you are allowed to update these contacts, there should be a way to fix this.
The gem raises an exception when you try to save an existing contact which has no contact lists (e.g. one that is in the do-not-mail group).
I'm new to Constant Contact, so perhaps you aren't allowed to update contacts that are in the do-not-mail group, but in that case there should be a more meaningful error. If you are allowed to update these contacts, there should be a way to fix this.