Activerecord-association: create new object (find class)
问题 I have an model with a relation, and I want to instantiate a new object of the relations type. Example: A person has a company, and I have a person-object: now I want to create a company-object. The class of the companyobject is defined in the relation, so I don't think I should need to 'know' that class, but I should be able to ask the person-object to provide me with a new instance of type company? But I don't know how. This is -I think- the same question as New model object through an