We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
jsonapi_resources
1 parent 2d7e38b commit 120f06eCopy full SHA for 120f06e
1 file changed
lib/jsonapi/routing_ext.rb
@@ -69,7 +69,8 @@ def jsonapi_resources(*resources, &_block)
69
options[:path] = format_route(@resource_type)
70
71
if res.resource_key_type == :uuid
72
- options[:constraints] = {id: /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/}
+ options[:constraints] ||= {}
73
+ options[:constraints][:id] ||= /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/
74
end
75
76
if options[:except]
0 commit comments