I am pleased to announce the release of the plugin English Like Queries [pronounced in a proper British accent] v0.0.2
Changes: klass.where 'name includes' => ['abc', 'def'] now defaults to a .find :all query--much nicer.
English Like Queries:
Typically AR basically stinks to type in--it is way too wordy, and, for lack of a better term, SQL like. klass.find :all, :conditions => ["name LIKE '%?'", 'fred']
This library condenses that to be a little more englishy, by allowing hashed parameters that are parsed for meaning, ex:
klass.where 'name starts with' => 'fred'
This reads better, is much faster, has support for regex, case sensitivity, etc. without the pain of SQL. Currently as a rails plugin. Check it out.
http://code.google.com/p/ruby-roger-useful-functions/wiki/EnglishLikeQueries
-=R