On May 10, 2:49 pm, Greg Raymond <[email protected]> wrote:
> Hi,
> I have a simple program that tries to do something really basic.
> First, I have a company Model :
> -------------------------------------
> class Company < ActiveRecord::Base
>  has_one :billingAddress, :foreign_key=>"id", :class_name=>"Address"
> end

I think your problem is in :foreign_key=>"id" part. This means that
foreign key to address is named 'id' which is actually id column for
Company model. Remove this part if your foreign key column is
'address_id' or use real column name, i.e. 'billing_address_id'
otherwise

Regards,
Bosko

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to