diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-01 09:45:46 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-01 09:45:46 -0800 |
commit | 989923e5a413d7527a7f1cdf5f18da7ff36ea4cc (patch) | |
tree | 57aa1a905af6780f1928b858fbe0e42615c8485c /activerecord/lib | |
parent | 82701cd61e2e4ba0fd70be0c7547d1d783ef2d51 (diff) | |
parent | a34c10f73e739142794a2e6366328051fcc91238 (diff) | |
download | rails-989923e5a413d7527a7f1cdf5f18da7ff36ea4cc.tar.gz rails-989923e5a413d7527a7f1cdf5f18da7ff36ea4cc.tar.bz2 rails-989923e5a413d7527a7f1cdf5f18da7ff36ea4cc.zip |
Merge pull request #13912 from mauricio/bug-13907
Fixes issue with parsing whitespace content back from database - fixes #13907
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/array_parser.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/array_parser.rb b/activerecord/lib/active_record/connection_adapters/postgresql/array_parser.rb index 20de8d1982..0b218f2bfd 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/array_parser.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/array_parser.rb @@ -91,8 +91,9 @@ module ActiveRecord end def add_item_to_array(array, current_item, quoted) - if current_item.length == 0 - elsif !quoted && current_item == 'NULL' + return if !quoted && current_item.length == 0 + + if !quoted && current_item == 'NULL' array.push nil else array.push current_item |