tapajos/highrise — Issue #29: Can't update Person's phone number
Author: dmix
Created: 2011-11-02 17:15:15+00:00
State: open

When I find a person via:
@person = Highrise::Person.find_all_across_pages(:params => {:email => @user.email}).first

I can save the first and last name fine via:
@person.first_name = @user.first_name
@person.last_name = @user.last_name
@person.save

Then I requested this persons phone numbers in rails console:
=> @person.contact_data.phone_numbers
=> [#79214279, "location"=>"Work", "number"=>"647 966 7986"}, @prefix_options={}, @persisted=false>]

But when I try to add a new phone number, it doesn't save for some reason (even though @person.save returns true)
@person.contact_data.phone_numbers << Highrise::Person::ContactData::PhoneNumber.new({:number => @user.company.phone, :location => "Work"})
@person.save

But when I request the phone numbers again, it doesn't appear to add the new number.

Am I missing something?