Class: DbUrlHelper::Adapter::Postgresql

Inherits:
Generic
  • Object
show all
Includes:
Registerable
Defined in:
lib/db_url_helper/adapter/postgresql.rb

Constant Summary collapse

DEPENDS =
:PG
SCHEME =
"postgresql"
PRIORITY =
0

Class Method Summary collapse

Methods included from Registerable

base, included, #testable?

Methods inherited from Generic

get, lookup, scheme, via

Class Method Details

.databaseObject



15
16
17
# File 'lib/db_url_helper/adapter/postgresql.rb', line 15

def database
  "#{Rails.application.class.parent_name.underscore}_#{Rails.env}"
end

.passwordObject



12
13
14
# File 'lib/db_url_helper/adapter/postgresql.rb', line 12

def password
  ENV['DB_PASSWORD'] || ""
end

.userObject



9
10
11
# File 'lib/db_url_helper/adapter/postgresql.rb', line 9

def user
  Rails.application.class.parent_name.underscore
end