aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoders/nil_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/json/encoders/nil_class.rb')
-rw-r--r--activesupport/lib/active_support/json/encoders/nil_class.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/json/encoders/nil_class.rb b/activesupport/lib/active_support/json/encoders/nil_class.rb
new file mode 100644
index 0000000000..98bb6fb677
--- /dev/null
+++ b/activesupport/lib/active_support/json/encoders/nil_class.rb
@@ -0,0 +1,5 @@
+class NilClass
+ def to_json #:nodoc:
+ 'null'
+ end
+end