Rails Get Current Database Name

[Solved] Rails Get Current Database Name | Ruby - Code Explorer | yomemimo.com
Question : How to find database name in rails console

Answered by : talaatmagdy

ActiveRecord::Base.connection.current_database

Source : https://stackoverflow.com/questions/29870610/how-to-find-database-name-in-rails-console | Last Update : Tue, 23 Nov 21

Question : rails get current database name

Answered by : poor-polecat-qwn30utleie1

Rails.configuration.database_configuration["development"]["database"]

Source : https://stackoverflow.com/questions/10001583/how-to-check-the-database-name-that-activerecord-uses | Last Update : Mon, 30 Nov 20

Answers related to rails get current database name

Code Explorer Popular Question For Ruby