ActiveRecord, Squeel: Getting objects without parent associations

I have:

class ThingsCollection < ActiveRecord::Base
has_and_belongs_to_many :things, uniq: true
end

class Thing < ActiveRecord::Base
has_and_belongs_to_many :things_collections, uniq: true
end

I want to get Things which don’t have any ThingsCollections
(thing.things_colllection_ids.empty? == true). How can I do this via
ActiveRecord & Squeel? (Without SQL query if possible)

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