View Single Post
Old May 30th, 2006, 11:32 AM   #3
SirBob1701
Newbie
 
Join Date: May 2006
Posts: 20
Rep Power: 0 SirBob1701 is on a distinguished road
edit

I figured it out i should be
[code = oil.rb]
class Oil < ActiveRecord::Base
set_primary_key 'OilID'
belongs_to :truck, :foreign_key => 'vehicleID'
end
[/code]

[code = truck.rb]
class Truck < ActiveRecord::Base
set_primary_key 'vehicleID'
has_many :oils
end
[/code]
SirBob1701 is offline   Reply With Quote