aboutsummaryrefslogtreecommitdiff
path: root/lib/override/to_json.rb
blob: 73fbe5c330b05c13b660a27f7331f7a8ae970a77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# activesupport/lib/core_ext/object/to_json.rb overrides to_json for
# most core objects like so:
#
#    [Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass].each do |klass|
#      klass.class_eval do
#        # Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
#        def to_json(options = nil)
#          ActiveSupport::JSON.encode(self, options)
#        end
#      end
#    end
#
# We cannot tolerate this. We need the normal to_json to be called, not
# ActiveSupport's custom version.
#
# This file exists to override the behavior of ActiveSupport. This file will get included
# instead of the normal to_json.rb.
#