If there is a has_many :authors association, the following finds alls posts which do not have authors:

Post.where.missing(:authors)

If you need to find all posts which have authors:

Post.where.associated(:authors)