Module: Rails::DataMapper

Extended by:
ActiveSupport::Memoizable
Defined in:
lib/rails_datamapper.rb

Class Method Summary collapse

Class Method Details

.create_connectionObject



11
12
13
14
15
16
# File 'lib/rails_datamapper.rb', line 11

def create_connection
  # TODO: handle Rails and Merb style database.yml files
  conf = config.dup
  repositories = conf.delete(:repositories)
  ::DataMapper.setup(:default, conf) unless conf.empty?
end