In my controller, I do this to instantiate and populate my Part,
PartName and PartNumber objects.
def edit
@part = Part.find(params[:id], :include => [:part_name,
:part_number])
end
But in the view, this doesn’t refer to the right object. I somehow
need to indicate that the part_name object is a child of the part
object.
<%= text_field_with_auto_complete :part_name, :part_name%>
If I instantiate the part_name object separately it works but I
thought I didn’t have to do that.
- Ian