I have a rails project running that defines the standard production:, :development and :test DB-connections in config/database.yml
In addition I have a quiz_developm
I've found a great clean way to do this:
class CreateScores < ActiveRecord::Migration
class ScoresDB < ActiveRecord::Base
establish_connection("scores_#{Rails.env}")
end
def connection
ScoresDB.connection
end
def up
create_table :scores do |t|
t.text :account_id
t.text :offer
end
end
def down
drop_table :scores
end
end