influitive/apartment — pull request #60 by eric88 (2013-06-04 00:18:21+00:00)
Title: Fix for Mysql2SchemaAdapter whe using prepend_environment

The bug occurs when calling Apartment::Database.create("new_db"). It creates "#{Rails.env}_new_db" but then tries to switch to "new_db".

Also changed reset() because otherwise it will try to change to "#{Rails.env}_#{default_database}".