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

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -