rails/arel — pull request #165 by avit (2013-03-01 03:47:09+00:00)
Title: Equality should handle NOT values with != () or NOT LIKE ()

This fixes SQL syntax when composing `Not` nodes into binary comparison nodes and cancels double-negatives:

* `.eq(not_x)` "!= x"
* `.not_eq(not_x)` "= x"
* `.like(not_x)` "NOT LIKE x"
* `.not_like(not_x)` "LIKE x"

Use case: in a Ransack search I want to use `eq` or `not_eq` to include "y != 'chunky' OR y IS NULL". (Simple != will skip NULL rows.) This currently does not work:

```ruby
attr.eq_any( [Nodes::Not('chunky'), nil] )
```