Sha256: d817961a888f8703f61ae30332bf0dcde1e390593778f6fd3aa2ce6d18e44f93

Contents?: true

Size: 519 Bytes

Versions: 11

Compression:

Stored size: 519 Bytes

Contents

module Bio
  module <%= sub_module.capitalize %>
    class DummyConn < ActiveRecord::Base
        self.abstract_class = true
        root_path = File.join(File.dirname(__FILE__),"../../../")
        configurations =  YAML.load_file(File.join(root_path,"config/database.yml"))
        configurations.each_pair do |key, db_info|
          db_info["database"] = File.join(root_path, db_info["database"]) if db_info["adapter"]=='sqlite3'
        end
        establish_connection(configurations["default"])
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bio-gem-1.3.6 lib/bio-gem/templates/db_connection
bio-gem-1.3.5 lib/bio-gem/templates/db_connection
bio-gem-1.3.4 lib/bio-gem/templates/db_connection
bio-gem-1.3.3 lib/bio-gem/templates/db_connection
bio-gem-1.3.2 lib/bio-gem/templates/db_connection
bio-gem-1.3.1 lib/bio-gem/templates/db_connection
bio-gem-1.3.0 lib/bio-gem/templates/db_connection
bio-gem-1.2.2 lib/bio-gem/templates/db_connection
bio-gem-1.2.1 lib/bio-gem/templates/db_connection
bio-gem-1.2.0 lib/bio-gem/templates/db_connection
bio-gem-1.1.2 lib/bio-gem/templates/db_connection