rails/rails — pull request #8332 by amatsuda (2012-11-27 07:22:32+00:00)
Title: Relation.where with no args can be chained with not, like, and not_like

Finally implemented @jeremy's suggestion here https://github.com/rails/rails/pull/5950#issuecomment-5591330

This patch adds a chainable mode to `AR::Relation` for new AR `not`, `like`, and `not_like` query methods.

examples:
```ruby
Model.where.not field: nil
#=> "SELECT * FROM models WHERE field IS NOT NULL

Model.where.like name: 'Jeremy%'
#=> "SELECT * FROM models WHERE name LIKE 'Jeremy%'
```