I think the method ActiveRecord::Base.connection#tables might be what your looking for.
(I found it documented under the PostgreSQLAdapter, but it seems to exist in the MySQL and SQLite adapters as well.) -John On Thu, Apr 17, 2008 at 4:24 PM, Glenn Little <[EMAIL PROTECTED]> wrote: > > Is there a simple way in rails to, for instance, iterate over > all the tables in a database (without knowing ahead of time > their names)? > > I'd actually like to iterate over all columns, and it appears > that I can with the column_names method, but I need the class > on which to call column_names. > > Thanks... > > -glenn > > > > -- John Parker [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby -~----------~----~----~----~------~----~------~--~---
