Book.missing_author #without a parent
Author.missing_books #without children
# New WhereChain method:Post.where.missing(:author)
# Equivalent:Post.left_joins(:author).where(authors: { id: nil })
# Resulting sQL# SELECT "posts".* FROM "posts" LEFT OUTER JOIN "authors" ON "authors"."id" = "posts"."author_id" WHERE "authors"."id" IS NULL
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
--