13 lines
310 B
Plaintext
13 lines
310 B
Plaintext
db = URI.parse('postgres://postgres:testni_hamo2@localhost/ribica')
|
|
|
|
|
|
|
|
ActiveRecord::Base.establish_connection(
|
|
:adapter => db.scheme == 'postgres' ? 'postgresql' : db.scheme,
|
|
:host => db.host,
|
|
:username => db.user,
|
|
:password => db.password,
|
|
:database => db.path[1..-1],
|
|
:encoding => 'utf8'
|
|
)
|