m33lky m33lky - 2 years ago 77
Ruby Question

how to check the database name that ActiveRecord uses

In database.yml you define all the settings. How can I access those settings from ruby? I've looked in

, but can't find it there. Also, I remember people were able to configure database settings without yaml, does anyone know how?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download