Better implementation of equals, and a new scope: not_equals.
_equals implemented another way
Hi Greg, can you add some tests for the not_equals scope?
fix test for _equals method
add test for _not_equals method
There you go.
To clarify this a bit, what are the goals here?
Is it important that this be applied to the rails2 branch specifically, or do you just like this change in general?
Is the main goal of the _equals change to be able to accept things like Range and Array to generate more queries?
The change to _equals causes it to do the right thing with nil and arrays. _not_equals is beneficial as a new function. I applied it to Rails 2 since that's what I use and can test on. Idealistically someone would implement it for Rails 3 as well.
Just talked with Matt (mjankowski) about this, and the rails2 branch in general. The tests have changed between branches, to the point where we have little confidence in the rails2's tests. We no longer use Rails 2 on any projects, and haven't for some time.
To that end we will close this pull request and remove the rails2 branch. It's totally understandable if you'd like to make a rails2-specific fork of this project.
Thank you for submitting the pull request. Feel free to re-open for a patch against master!