binarylogic / searchlogic

Searchlogic provides object based searching, common named scopes, and other useful tools.
http://rdoc.info/projects/binarylogic/searchlogic
MIT License
1.39k stars 133 forks source link

Reverse named_scopes not only for just equal #1

Closed nicolasblanco closed 15 years ago

nicolasblanco commented 15 years ago

It would be very cool to also have "reverse" named_scope for all conditions, not only equal.

For example :

  User.username_not_blank
  User.username_not_empty
  User.username_does_not_end_with("bjohnson")
  User.username_does_not_begin_with("bjohnson")

and so on...

I may try to help for this :).

Nicolas

sheldonh commented 15 years ago

Bigtime. I've run into this with LIKE, and got suspicious results (duplicated rows) when I tried it myself across a join.

ghost commented 15 years ago

This has been in searchlogic for a couple of weeks now, sorry for not noticing this. But you should be good to go.

tomash commented 14 years ago

this is a great feature, but any chance searchlogic will also get something like column_not_equals or even column_not_equals_any([1,2,3])?