Created
September 7, 2012 20:19
-
-
Save pkieltyka/3669280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'activesupport' # assuming this is already loaded by some dependency.. | |
require 'json' | |
if defined?(ActiveSupport::JSON) | |
[Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass].each do |klass| | |
klass.class_eval do | |
def to_json(*args) | |
super(args) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment