rails equivalent of sql 'in ' operator -


Assume that our models are A, B, and C

A 1: N B1 : N to C

How do I use a query to return a subset of C such that the owner of each C is one of the A's owned B?

Essentially but this is unanswered

Must have:

A has_one C ,: = through = B

and then you will be able to AC

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -