lib/multiverse/railtie.rb in multiverse-0.1.0 vs lib/multiverse/railtie.rb in multiverse-0.1.1
- old
+ new
@@ -37,8 +37,16 @@
task purge: %w(environment load_config check_protected_environments) do
ActiveRecord::Tasks::DatabaseTasks.purge ActiveRecord::Base.configurations[Multiverse.env("test")]
end
end
end
+
+ namespace :multiverse do
+ task :load_config do
+ ActiveRecord::Base.establish_connection(Multiverse.record_class.connection_config)
+ end
+ end
+
+ Rake::Task["db:migrate:status"].enhance ["multiverse:load_config"]
end
end
end