Searchlight helps you build searches from options via Ruby methods that you write. Searchlight can work with any ORM or object that allows chaining search methods. It comes with modules for integrating with ActiveRecord and ActionView, but can easily be used in any Ruby program.
Gemfile gem 'searchlight', '~> 0.9.0'
install gem install searchlight -v 0.9.0