how can i get all table names of an mysql database

after i connect to a mysql database,how can i get the table names in this db?

show tables;

after i connect to a mysql database,how can i get the table names in this db?

>

but,how can i do this using Rails?

but,how can i do this using Rails?

ActiveRecord::Base.connection.tables

Will return an array of all the table names.

thanks