diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-26 01:48:41 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-26 01:54:14 -0700 |
commit | b319e69ecb06692995664dba263813d99bc2145f (patch) | |
tree | a50922c75cd6ea9e86b43fea5fff80ce1325b306 /activerecord/lib/active_record/connection_adapters | |
parent | d2d739fd0687bf94ee42b69c413a9077b9cdbff7 (diff) | |
download | rails-b319e69ecb06692995664dba263813d99bc2145f.tar.gz rails-b319e69ecb06692995664dba263813d99bc2145f.tar.bz2 rails-b319e69ecb06692995664dba263813d99bc2145f.zip |
PostgreSQL: pg driver expects nil instead of empty string for missing user/pass
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index bc6fd4e722..55c7da5b4f 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -23,8 +23,8 @@ module ActiveRecord 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] |