What is the easiest way to get the present username, password and db name being used? Is this info being stored in an object?
I want the information to run a mysql command to export data onto server using system("')
Thanks
– John K. [email protected]
http://www.kopanas.com
http://www.soen.info
ActiveRecord::Base.configurations will return a hash that has the information you need. ActiveRecord::Base.configurations[‘test’], for example, will return the DB settings for your test environment.
The constant RAILS_ENV has the current environment.
ahhh… very cool… now how do I know which environment I am in?
On 5/28/07, John K. [email protected] wrote:
On 5/28/07, John K. [email protected] wrote: John K. – John K. [email protected] http://www.kopanas.com http://www.cusec.net http://www.soen.info
On 5/28/07, John K. [email protected] wrote: John K.
John K.
http://www.kopanas.com http://www.cusec.net http://www.soen.info
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.