Class: Babik::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/babik/database.rb

Overview

Database configuration

Class Method Summary collapse

Class Method Details

.configHash{adapter:}

Return database configuration

Returns:

  • (Hash{adapter:})

    Database configuration as a Hash.



8
9
10
# File 'lib/babik/database.rb', line 8

def self.config
  ActiveRecord::Base.connection_config
end

.escape(string) ⇒ Object



12
13
14
# File 'lib/babik/database.rb', line 12

def self.escape(string)
  ActiveRecord::Base.connection.quote(string)
end