Forum: Ruby on Rails How do I allow users to search a database table?

99713a5ec23b5195250c9910eb13f01f?d=identicon&s=25 Jason Hsu, Android developer (Guest)
on 2013-07-10 01:39
(Received via mailing list)
I recently launched the new Rails-based version of Doppler Value
Investing
(http://www.dopplervalueinvesting.com).  It profiles over 4000
individual
stocks in terms of free cash flow and net liquid assets.

As you can see at http://dopplervalueinvesting.com/stocksview, 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?
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2013-07-10 16:26
(Received via mailing list)
You might want to look at one or another of the search helper gems. This
one is nice: https://www.ruby-toolbox.com/projects/meta_search
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.

Walter
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.