I'm not sure of what you need to do but I'll assume that you just want
to create an association between a person and a vehicle of type car or
truck (or whatever).
I am assuming that you have STI built into your vehicles table, with a
column named 'type' that stores the type of vehicle
('Car'/'Truck'/'Whatever'). If you just want to assign a vehicle to
the person I don't see a reason why you should know the type of
vehicle it is.
Based on your code you know the id of the vehicle. Why not do
person.car = Vehicle.find(params[:id])
You might not know the type of vehicle it is but does it matter?
And going even further, do you really need to retrieve the vehicle
row? I guess that if you can't trust the id beeing an honest value you
should but if you could trust it, couldn't you just do?:
person.vehicle_id = params[:id]
Maybe I am not understanding your need?