Class: DbBrowser::ConnectionMan::AbstractModel

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/dbbrowser/connection.rb

Constant Summary collapse

CONNECTS =

cache connections

{}

Class Method Summary collapse

Class Method Details

.connection_for(key) ⇒ Object



26
27
28
29
30
31
# File 'lib/dbbrowser/connection.rb', line 26

def self.connection_for( key )
  CONNECTS[ key ] ||= begin
    establish_connection( key )
    connection
  end
end