0

Is it possible to perform a NOT type query with chained methods using postgres_ext?

rules = Rule.where.overlap(:tags => ["foo"])

Basically want the inverse of the above. Thanks!

Patsy Issa
  • 11,113
  • 4
  • 55
  • 74
kreek
  • 8,774
  • 8
  • 44
  • 69

1 Answers1

0

In regular active record you can use .where.not as described in this article: https://robots.thoughtbot.com/activerecords-wherenot however looking through the source code of postgres_ext I don't know if it is defined in that library. You may be able to construct your query in a way that uses the native active record methods.

NateSHolland
  • 1,130
  • 2
  • 11
  • 25