Skip to content

Commit 5a70b1a

Browse files
rintaunshishirmk
authored andcommitted
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.
1 parent 8357acd commit 5a70b1a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/fast_jsonapi/object_serializer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require 'active_support/core_ext/object'
3+
require 'active_support/json'
44
require 'active_support/concern'
55
require 'active_support/inflector'
66
require 'fast_jsonapi/attribute'
@@ -65,7 +65,7 @@ def hash_for_collection
6565
end
6666

6767
def serialized_json
68-
self.class.to_json(serializable_hash)
68+
ActiveSupport::JSON.encode(serializable_hash)
6969
end
7070

7171
private

0 commit comments

Comments
 (0)