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', '~> 1.2.3'
install gem install searchlight -v 1.2.3