How do I allow users to search a database table?

I recently launched the new Rails-based version of Doppler Value Investing ( It profiles over 4000 individual stocks in terms of free cash flow and net liquid assets.

As you can see at, I know how to extract data from a table in a Postgres database and display it to users.

However, I’m looking for a way to provide a search form that allows users to create their own custom search of the stock database table and see their results. Where can I find a good example of this?

You might want to look at one or another of the search helper gems. This one is nice: Project: meta_search - The Ruby Toolbox Basically, any of these will extend ActiveRecord to give your views the ability to construct custom search queries. This can be used to make really detailed search forms that essentially reflect over your database structure.