From 5a70b1a686d6e7c103030be02baf81c27fb01417 Mon Sep 17 00:00:00 2001 From: Matthew Lanigan Date: Wed, 18 Jul 2018 00:02:41 -0400 Subject: [PATCH] Do not use ActiveSupport core extensions Core extensions do not play well with many other gems; especially considering that they only seem to be included for one `to_json` call, they should be avoided. --- lib/fast_jsonapi/object_serializer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fast_jsonapi/object_serializer.rb b/lib/fast_jsonapi/object_serializer.rb index 26a4f95..183d622 100644 --- a/lib/fast_jsonapi/object_serializer.rb +++ b/lib/fast_jsonapi/object_serializer.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'active_support/core_ext/object' +require 'active_support/json' require 'active_support/concern' require 'active_support/inflector' require 'fast_jsonapi/attribute' @@ -65,7 +65,7 @@ module FastJsonapi end def serialized_json - self.class.to_json(serializable_hash) + ActiveSupport::JSON.encode(serializable_hash) end private