Deep relationships in Rails

Posted by Neil Middleton on Stack Overflow See other posts from Stack Overflow or by Neil Middleton
Published on 2010-03-09T00:00:46Z Indexed on 2010/03/09 0:06 UTC
Read the original article Hit count: 191

Filed under:
|
|

I have some projects. Those projects have users through memberships.

However, those users belong to companies. Question is, how do I find out which companies can access a project?

Ideally I'd be able to do project.users.companies, but that won't work.

Is there a nice, pleasant way of doing this?

© Stack Overflow or respective owner

Related posts about activerecord

Related posts about ruby-on-rails