Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

dynamic database connection in rails

ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:host => 'localhost',
:username => 'name',
:password => 'password',
:database => 'db_name'
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamic #database #connection #rails
ADD COMMENT
Topic
Name
7+7 =