Jason Hsu, Android developer
2013-Jul-09 23:37 UTC
How do I allow users to search a database table?
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? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b0b69935-4d99-4793-a518-57334d2b2def%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Walter Lee Davis
2013-Jul-10 14:25 UTC
Re: How do I allow users to search a database table?
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 On Jul 9, 2013, at 7:37 PM, Jason Hsu, Android developer wrote:> 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? > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b0b69935-4d99-4793-a518-57334d2b2def%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/03C5AA93-28A1-4A6C-AB1C-F4791A406343%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.