Your client already has a hash of @portfolios, which already lets them be contained in the client. Thus, you don't need an investor variable here, because instances of the Portfolio should only actually be stored in the clients.portfolios hash.