Object is populated but attributes are unavailable

Will someone please tell me why this code…

def test

 org = Organization.find(1)

 write_log("Org: #{org.inspect}")

 write_log("Org name: #{org.org_name}")

end

…is returning the blank org_name below?
Am I accessing the object’s attribute wrong?

Org: #<Organization:0x39c97d0 @attributes={“user_last_name”=>“James”,
“user_first_name”=>“Kevin”, “id”=>“1”, “org_name”=>“James Photographic
Illustration”, “user_email_address”=>“[email protected]”,
“user_password”=>“password”, “user_id”=>“kevin”}>
Org name:


Trying to access org.org_name without using the string interpolation
method gives me a “nil” error. I don’t understand something basic here.

Thanks,
Michael

My Stack:
Ruby 1.8.2-15 for Windows
WEBrick 1.3.1
Rails 0.13.1
MySQL 5.0.22-community-nt


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails