1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00

Allow configuring test DB connection

This commit is contained in:
David Rodríguez 2019-10-14 15:11:08 +02:00
parent 3bd0078fae
commit e32e3af10d
No known key found for this signature in database
GPG key ID: 1008A258BB37309C

View file

@ -13,7 +13,9 @@ when 'pg', 'postgres', 'postgresql'
ActiveRecord::Base.establish_connection(
adapter: 'postgresql',
database: 'ransack',
# username: 'postgres', # Uncomment the username option if you have set one
username: ENV.fetch("DATABASE_USERNAME") { "postgres" },
password: ENV.fetch("DATABASE_PASSWORD") { "" },
host: ENV.fetch("DATABASE_HOST") { "localhost" },
min_messages: 'warning'
)
else