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

后端 未结 6 1758
忘了有多久
忘了有多久 2020-12-02 04:30

I was wondering if you could list/examine what databases/objects are available to you in the Rails console. I know you can see them using other tools, I am just curious. Tha

6条回答
  •  攒了一身酷
    2020-12-02 04:57

    You can use rails dbconsole to view the database that your rails application is using. It's alternative answer rails db. Both commands will direct you the command line interface and will allow you to use that database query syntax.

提交回复
热议问题