View Single Post
Old Jun 1st, 2006, 12:14 PM   #5
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
The controller seems odd. The code in it tries to find trucks with vehicleIDs equalling the string "truck_vehicleID".

Since vehicleID is the primary key, I suspect you could do something like:
def found
    @truck = Truck.find(@params['truck']['vehicleID'])
    @oils = @truck.oils
    ...
end
Arevos is offline   Reply With Quote