Hi P. Pantouffe,
how do I list all the tables in a database?
with : ActiveRecord::Base.connection.tables
-- Jean-François.
Hi P. Pantouffe,
how do I list all the tables in a database?
with : ActiveRecord::Base.connection.tables
-- Jean-François.
P. Pantouffe :
I have another one :). How can i get a list with all the classes in the application after i wrote several models. ?
In production mode, for AR:B-based models :
ActiveRecord::Base.send(:subclasses)
but I'm not so sure...
-- Jean-François.
Not exactly what you are asking for, but might be useful: http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Tech/Ruby/AnnotateModels.rdoc
it annotates your models