rails/rails — pull request #13534 by kuldeepaggarwal (2013-12-29 19:33:29+00:00)
Title:    skip 'not' with 'nil opts'

`Model.not ` should also skip(similar to `where`) `not` scope from the `WhereChain`, if it receives `nil`, like:

Before:
User.where.not(nil) # => 'SELECT `users`.* FROM `users` WHERE (NOT (NULL))'

After:
User.where.not(nil) # => 'SELECT `users`.* FROM `users`'