search for: dbs_host

Displaying 1 result from an estimated 1 matches for "dbs_host".

Did you mean: db_host
2008 May 05
0
uses_connection plugin
...aring the same data, in other words, this is just a nicer way of using “Model.establish_connection(database)”. Example: ======= First create a ‘shared’ database configuration in config/database.yml: shared: adapter: mysql database: shared_database username: user password: password host: dbs_host Next tell your model that it should connect the the ‘shared’ database and use the table there… class ZipCode < ActiveRecord::Base # Uses the ''shared'' database in all environments uses_connection :shared, :in => :all end ... and the next time you do ZipCode.find(:firs...