Module: DatabaseManager
- Defined in:
- lib/database_manager.rb,
lib/database_manager/tasks.rb
Defined Under Namespace
Modules: Tasks
Class Method Summary collapse
Class Method Details
.prepare(config, structure_location) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/database_manager.rb', line 2 def self.prepare(config, structure_location) require 'active_record' ActiveRecord::Base.establish_connection(config) ActiveRecord::Tasks::DatabaseTasks.purge config.stringify_keys ActiveRecord::Tasks::DatabaseTasks.structure_load( config.stringify_keys, structure_location ) end |