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, priority, scheme, via

Class Method Details

.databaseObject



18
19
20
# File 'lib/db_url_helper/adapter/postgresql.rb', line 18

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

.passwordObject



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

def password
  @password   = super
  @password ||= ENV['DB_PASSWORD']
  @password ||= ""
end

.userObject



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

def user
  @user   = super
  @user ||= Rails.application.class.parent_name.underscore
end