Rails query with a conditional includes not returning objects -
I have follow-up organizations:
is an order / many items have my key
I want to find all the items for a given order, and just get the keys that are true of the 'experiment' attribute. If this feature is not correct, do not give me the keys back, but I still want the item.
I have tried to:
@order = order (3) @ etams = @order.teamon (): (where 'keys.immed', right). Reference ('keys')
But this win will not return any results, and I would like to return these items to it, even if the keys with the attributes of using true keys Not be there
What am I missing?
try it
@ order = order.find (3) @items = @ order.items.joins (: key). Where (keys: {is used: true})
context:
Comments
Post a Comment