aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-07-14 10:38:14 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-07-15 08:43:54 -0700
commitf4c8a4b71fcce46c3259240b50f30e134e14c4a2 (patch)
tree3aa042102c2f2aa21a3060a0adb4e9dd994ff7df /activerecord/lib/active_record
parenta66aeb84e215c8a6e365a7fd0197c5703a14f241 (diff)
downloadrails-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')
-rw-r--r--activerecord/lib/active_record/coders/json.rb2
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