I am building an application where a User can have many Clients (which cannot be shared among Users).
It is a fairly small application but it could happen that two Clients belong to the same Organisation. So it would be nice to have an extra table to hold all the information about the Organisation. It could also happen that a Client is a private Client and does not belong to any Organisation.
I know in database design this is fairly common, but how can this be modelled in Rails?
The answer is what have been stated by @peter-duijnstee, with the additional constraints asked: