config/initializers/core_extensions_2.rb
# returns a hash of configuration variables for this ActiveRecord::Base's connection adapter
returns a hash of configuration variables for this ActiveRecord::Base's connection adapter
returns a hash of configuration variables for this ActiveRecord :: Base ' s connection adapter
def database_config
        adapter = self.connection.instance_eval { @current } || self.connection
        adapter.instance_eval { @config }
      end
def database_config adapter = self . connection . instance_eval { @current } || self . connection adapter . instance_eval { @config } end
returns a hash of configuration variables for this ActiveRecord::Base's connection adapter
returns a hash of configuration variables for this ActiveRecord :: Base ' s connection adapter
# in production, we have a ConnectionProxy with many adapters # otherwise #connection directly returns the adapter