Conditions on Joined Tables


I don’t see how to write correctly conditions for the following
query :

client has_many :orders

I would to get in one query :

all clients with NO ORDER + clients with orders where Today IS NOT in
range (order.start_date… order.end_date)

is it possible or should I write 2 queries then join the resulting
arrays ?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs