I have three tables: "users", "courses" and "documents". I would like to upload documents to users as well as to courses, so I would need two belongsTo-Relations for the Document model. Some belong to one model, some to the other.
Is there a simple solution to construct these relations?
How could I set up the "add"-actions?
I know I could set up two join tables and use HABTM, but that doesn't feel right. A document belongs only to one other item. Besides, I want to be able to extend the relations to more models if neccessary.