Sha256: 8bc6831c437891dc9b80efa22a66f02c19316caabeca66c28d057668d8b66587

Contents?: true

Size: 448 Bytes

Versions: 5

Compression:

Stored size: 448 Bytes

Contents

#fix for JSON gem/activesupport bug. More info: http://stackoverflow.com/questions/683989/how-do-you-deal-with-the-conflict-between-activesupportjson-and-the-json-gem
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
      def as_json(*args)
        super(args)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cloud-toaster-1.1.6 webapp/config/initializers/patches.rb
cloud-toaster-1.1.5 webapp/config/initializers/patches.rb
cloud-toaster-1.1.4 webapp/config/initializers/patches.rb
cloud-toaster-1.1.3 webapp/config/initializers/patches.rb
cloud-toaster-1.1.2 webapp/config/initializers/patches.rb