belongs_to association not connected to FK attribute?

Greetings all.

I'm having problems with a belongs_to not reporting the *correct* info.

>> p =
=> #<Patient:0x26284e0 @new_record=true, @attributes={"work_phone"=>nil, "city"=>nil, "postal_code"=>nil, "ACRES"=>nil, "health_insurance_province_id"=>nil, "province_id"=>nil, "country_id"=>nil, "address_two"=>nil, "firstname"=>nil, "lastname"=>nil, "health_insurance_expiry"=>nil, "health_insurance_version"=>nil, "id_orig"=>0, "PROVIDNUM"=>nil, "work_extension"=>nil, "sex"=>nil, "health_insurance_number"=>nil, "home_phone"=>nil, "PROVIDNAME"=>nil, "date_of_birth"=>nil, "middle_initial"=>nil, "other_phone"=>nil, "address_one"=>nil, "health_insurance_prov"=>nil}>
>> p.country_id = 100 #honduras
=> 100
=> #<Country:0x25a99d8 @attributes={"name_short"=>nil, "priority"=>"0", "name_long"=>"Honduras", "id"=>"100"}>
>> p.country_id = 105 #Indonesia
=> 105
=> #<Country:0x25a99d8 @attributes={"name_short"=>nil, "priority"=>"0", "name_long"=>"Honduras", "id"=>"100"}>
>> p.country_id
=> 105

wtf? why is Honduras returned as not honduras?

class Patient < ActiveRecord::Base

   belongs_to :country


I'm not aware of anything else that should impact the above symptom. Any ideas rails riders?

It somehow seems that the relationship Country isn't related to the attribute "country_id" ??

rails --version 1.1.6


wow - learn something new every day. every-single-day

Without much thought it seems to make sense that assigning a value to the FK really should suggest a cache clear on that association.

Thanx for your help Fred.