In my Rails app, I have three models: A, B and C, with the following
- B hasMany C
- C belongsTo B
I would like A to “has_one” instance of B+C. By that I mean A needs to
be linked to a specific instance of B AND a specific instance of C.
My first guess would be to create a fourth object, say B_plus_C that
- belongs to B
- belongs to C
- belongs to A
Is it a correct way to do this? I am not sure why, but it feels a bit
weird to have to create a model for this.
Thanks a lot!