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)