Rails: How to list database tables/objects using the Rails console? -


i wondering if list/examine databases/objects available in rails console. know can see them using other tools, curious. thanks.

you seeking:

activerecord::base.connection.tables 

and

activerecord::base.connection.table_structure("projects") 

you should wrap them in shorter syntax inside .irbrc.


Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -