diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-05-16 10:44:58 -0400 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-05-16 10:44:58 -0400 |
commit | aa7ded6a362c609cd00b6c4ebc91b1d089bca4c4 (patch) | |
tree | 2369e02de2a0c8cc63f0a9b30a9aa8b60840df54 /activerecord/lib | |
parent | e9cf20087b8db56f97c5dabbcccba6186df9648b (diff) | |
parent | 894facb1967c9f394be92ec699e4eafddc2aea52 (diff) | |
download | rails-aa7ded6a362c609cd00b6c4ebc91b1d089bca4c4.tar.gz rails-aa7ded6a362c609cd00b6c4ebc91b1d089bca4c4.tar.bz2 rails-aa7ded6a362c609cd00b6c4ebc91b1d089bca4c4.zip |
Merge pull request #23810 from xijo/fix_json_coder_when_mysql_strict_is_disabled
Fix bug in JSON deserialization when column default is an empty string
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/coders/json.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/coders/json.rb b/activerecord/lib/active_record/coders/json.rb index 75d3bfe625..cb185a881e 100644 --- a/activerecord/lib/active_record/coders/json.rb +++ b/activerecord/lib/active_record/coders/json.rb @@ -6,7 +6,7 @@ module ActiveRecord end def self.load(json) - ActiveSupport::JSON.decode(json) unless json.nil? + ActiveSupport::JSON.decode(json) unless json.blank? end end end |