There are a number of activerecord methods that will probably get you
what you want.  Take a look at columns or inspect.

http://api.rubyonrails.org/classes/ActiveRecord/Base.html

M

On Dec 17, 8:17 pm, Rilindo Foster <[email protected]> wrote:
> Is there a method that can either run a describe on the table or pull a list 
> of fields from a table? The rationale is that I am looking for a while to 
> automatically populate a drop down list so that I can execute a search based 
> on the field name submitted from the form. I can, of course, populate it 
> manually, but with 8+ models, it gets old fast.
>
> Is this the way to do it, through? Or should I try something like Sphinx for 
> these type of searches (which I am thinking of using anyway).
>
>  - Rilindo

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to