Skip to content
Browse files

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

… user/pass
  • Loading branch information...
1 parent ac7a020 commit d093e90f287fff8bbefa25302b83d8f2c3b5fa55 @jeremy jeremy committed Aug 26, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
4 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -23,8 +23,8 @@ def self.postgresql_connection(config) # :nodoc:
config = config.symbolize_keys
host = config[:host]
port = config[:port] || 5432
- username = config[:username].to_s
- password = config[:password].to_s
+ username = config[:username].to_s if config[:username]
+ password = config[:password].to_s if config[:password]
if config.has_key?(:database)
database = config[:database]

0 comments on commit d093e90

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