Predicate Builder form for Rails..?

I am trying to build a search form that allow the user to specify various conditions for the search - anyone seen an OSX-like predicate builder form for Rails? (think iTunes smart play lists or Mail.app's smart mailbox builder...)

any suggestions/pointers would be appreciated...

_DHMS