Rails.configuration.database_configuration
This will give you a hash table with the configurations for each of your environments. E.g. to get your development database name:
Rails.configuration.database_configuration["development"]["database"]
Rails.configuration.database_configuration
This will give you a hash table with the configurations for each of your environments. E.g. to get your development database name:
Rails.configuration.database_configuration["development"]["database"]