Closed marat-y closed 7 years ago
Hello there!
Would you please let me know if there's a way of filtering Parent objects depending on children attribute?
For example,
Request.where(number: 2)
while number attribute is in product_requests table.
number
This is the most straightforward way I can think of: Request.where(actable: ProductRequest.where(number: 2))
Request.where(actable: ProductRequest.where(number: 2))
You can now use ProductRequest.where(number: 2).actables (since v2.1.0).
ProductRequest.where(number: 2).actables
Hello there!
Would you please let me know if there's a way of filtering Parent objects depending on children attribute?
For example,
Request.where(number: 2)
while
number
attribute is in product_requests table.