I'm integrating infusionsoft with our rails app and we can create contacts using their API using this call, and passing the data through an array...
Infusionsoft.contact_add_with_dup_check({'Email' => contact.email, 'FirstName' => (contact.name if contact.name.present?)}, 'Email')
However, I want to be able to post additional contact info to their API if the contact in our rails app has more data. Such as if name or city is present. My attempt at checking if contact.name is present returns an error.
How can I do an if else statement within the array?