How to find database name in rails console
To find the database name in Rails console, you can use the following steps:
Step 1: Open the Rails console by running the command rails console in your terminal.
Step 2: Once the Rails console is open, type ActiveRecord::Base.connection.current_database and press Enter.
Step 3: The database name will be displayed as the output of the command.
That's it!