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
Post a Comment