如何使用 ActiveRecord 查询选择与某个父表对应的所有子行。
create table foo (id, ...)
create table bar (id, foo_id, ...)
select * from foo where key = ?
# The above return a single row or multiple rows.
select * from bar where foo_id in <ids from the above output>
我如何实现这一目标?