Return to Snippet

Revision: 46388
at May 18, 2011 11:06 by mstopa


Initial Code
class RegularModel < ActiveRecord::Base
end


class MyModel < ActiveRecord::Base
  establish_connection "another_db"
end

# these then use the following, located in database.yml
development:
  adapter: mysql
  database: firstdb
  pool: 5
  timeout: 5000

another_db:
  adapter: mysql
  database: second_db_table
  pool: 5
  timeoute: 5000

Initial URL


Initial Description


Initial Title
Use multiple databases in rails.

Initial Tags


Initial Language
Ruby