Thanks for the help.
I tried that but when I tried to spit out the table_2.info it actually produced a field from table_1.
Weird
Here's the approach I'm using now (to no avail):
The 2 tables I have are accounts and spaces. The accounts table will
have many spaces connecting the 2 tables by the foreign key user_id.
so I tried my 2 model declarations as follow:
class Account < ActiveRecord::Base
has_many :spaces
end
class Space < ActiveRecord::Base
belongs_to :account
end
Then I try to call the 2 tables w/ this:
@accounts = Account.find(:all, :include => :spaces )
Then I get this error:
Unknown column 'spaces.account_id' in 'on clause':
Somehow - it was getting the idea that account_id was the foreign key so
I did this:
class Account < ActiveRecord::Base
has_many :spaces, :class_name => 'Account', :foreign_key =>
"user_id"
end
class Space < ActiveRecord::Base
belongs_to :account, :class_name => 'Space', :foreign_key =>
"user_id"
end
and now I get this error: undefined method `loaded'
Most frustrating!