diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-07-14 10:38:14 -0700 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-07-15 08:43:54 -0700 |
commit | f4c8a4b71fcce46c3259240b50f30e134e14c4a2 (patch) | |
tree | 3aa042102c2f2aa21a3060a0adb4e9dd994ff7df /activerecord/lib/active_record/coders/json.rb | |
parent | a66aeb84e215c8a6e365a7fd0197c5703a14f241 (diff) | |
download | rails-f4c8a4b71fcce46c3259240b50f30e134e14c4a2.tar.gz rails-f4c8a4b71fcce46c3259240b50f30e134e14c4a2.tar.bz2 rails-f4c8a4b71fcce46c3259240b50f30e134e14c4a2.zip |
Merge pull request #16162 from chancancode/fix_json_coder
Fixed JSON coder when loading NULL from DB
Diffstat (limited to 'activerecord/lib/active_record/coders/json.rb')
-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 0f60b6dab2..75d3bfe625 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) + ActiveSupport::JSON.decode(json) unless json.nil? end end end |