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:
parent
3bd0078fae
commit
e32e3af10d
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue