Plugins - Squirrel
Add to favoritesSquirrel lets you specify query conditions in block form as a list of statements rather than the awkward hash normally provided to find. You can specify columns by simply stating them and comparing them to your parameters.
Location.find(:all) do
primary_address.zip == params[:zip]
updated_at < 1.week.ago
end
You can also group conditions for specifying OR or AND joins explicitly.
http://giantrobots.thoughtbot.com/2007/1/12/squirrel-once-more-with-feeling
http://svn.thoughtbot.com/plugins/squirrel
Rails' (MIT)
Searching and Queries
