Skip to content

Commit b9c6cf7

Browse files
committed
has_key? check for association.type should reference unformatted key
1 parent cda530a commit b9c6cf7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/jsonapi/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def parse_params(params, allowed_fields)
309309
if links_object.length == 0
310310
checked_has_many_associations[param] = []
311311
else
312-
if links_object.length > 1 || !links_object.has_key?(format_key(association.type))
312+
if links_object.length > 1 || !links_object.has_key?(unformat_key(association.type).to_s)
313313
raise JSONAPI::Exceptions::TypeMismatch.new(links_object[:type])
314314
end
315315

0 commit comments

Comments
 (0)