File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,13 @@ def self.add_renderer!
121121
122122 # Checks if an object is a collection
123123 #
124- # Stolen from [JSONAPI::Serializer], instance method.
124+ # Basically forwards it to a [JSONAPI::Serializer] as there's no public API
125125 #
126126 # @param resource [Object] to check
127127 # @param force_is_collection [NilClass] flag to overwrite
128128 # @return [TrueClass] upon success
129129 def self . is_collection? ( resource , force_is_collection = nil )
130- return force_is_collection unless force_is_collection . nil?
131-
132- resource . respond_to? ( :size ) && !resource . respond_to? ( :each_pair )
130+ JSONAPI ::ErrorSerializer . is_collection? ( resource , force_is_collection )
133131 end
134132
135133 # Resolves resource serializer class
You can’t perform that action at this time.
0 commit comments