Hi,
Are the active database.yaml attributes for the current environment
(dev, prod, test) available inside a controler ?
adapter, host, db, socks, etc.
AFIK Class#connection don’t give back theses infos.
Thanks
Hi,
Are the active database.yaml attributes for the current environment
(dev, prod, test) available inside a controler ?
adapter, host, db, socks, etc.
AFIK Class#connection don’t give back theses infos.
Thanks
On 12/23/05, Mathieu C. [email protected] wrote:
Are the active database.yaml attributes for the current environment
(dev, prod, test) available inside a controler ?
ActiveRecord::Base.configurations[RAILS_ENV.to_sym][‘database’]
ActiveRecord::Base.configurations[RAILS_ENV.to_sym][‘host’]
ActiveRecord::Base.configurations[RAILS_ENV.to_sym][‘adapter’]
–
Cheers,
Peter D.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs