= Inequal Opportunity ActiveRecord is a ruby ORM released with Ruby on Rails. It has a hash syntax for specifying SQL conditions: YourModel.count(:conditions => {:id => 5}) YourModel.all(:limit => 5, :order => :created_at, :conditions => {:user_id => 5}) But this hash format lacks inequalities. In order to generate: SELECT * from your_models where id <> '42'; You have to write: YourModel.count(:conditions => ['id <> ?', 42]) With Inequal Opportunity, you can write: YourModel.count(:conditions => {:id => ne(42)}) Where Object#ne wraps 42 in a ActiveRecord::Inequality::NotEqual class, which is then used to insert the proper operator into the generated SQL. Other supported inequalities are: gte() => >= gt() => > lte() => <= le() => < ne() => <> ne(nil) => IS NOT Test coverage is real sparse right now. And it's only been tested on MySQL. I also am not completely satisfied with the way I overwrite ActiveRecord.expand_range_bind_variables, but it works. == License Inequal Opportunity is released under the MIT license. == Support Just email me at ryan@angilly.com with questions, bugs, or patches