The change from https://github.com/rails/rails/pull/41465 was a
breaking change. Before, `.without` was delegated to `Array` and worked
with nil arguments. This change restores that old behavior.
The change from https://github.com/rails/rails/pull/41465 was a
breaking change. Before, `.without` was delegated to `Array` and worked
with empty arguments. This change restores that old behavior.
This method excludes the specified record (or collection of records) from the resulting relation.
For example: `Post.excluding(post)`, `Post.excluding(post_one, post_two)`, and `post.comments.excluding(comment)`.
This is short-hand for `Post.where.not(id: post.id)` (for a single record) and `Post.where.not(id: [post_one.id, post_two.id])` (for a collection).