Skip to content
This repository
Browse code

PostgreSQL: pg driver expects nil instead of empty string for missing…

… user/pass
  • Loading branch information...
commit d093e90f287fff8bbefa25302b83d8f2c3b5fa55 1 parent ac7a020
Jeremy Kemper jeremy authored
4 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -23,8 +23,8 @@ def self.postgresql_connection(config) # :nodoc:
23 23 config = config.symbolize_keys
24 24 host = config[:host]
25 25 port = config[:port] || 5432
26   - username = config[:username].to_s
27   - password = config[:password].to_s
  26 + username = config[:username].to_s if config[:username]
  27 + password = config[:password].to_s if config[:password]
28 28
29 29 if config.has_key?(:database)
30 30 database = config[:database]

0 comments on commit d093e90

Please sign in to comment.
Something went wrong with that request. Please try again.