We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9bcc4e + 120f06e commit d4880feCopy full SHA for d4880fe
1 file changed
lib/jsonapi/routing_ext.rb
@@ -81,7 +81,8 @@ def jsonapi_resources(*resources, &_block)
81
options[:path] = format_route(@resource_type)
82
83
if res.resource_key_type == :uuid
84
- 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] ||= {}
85
+ 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}/
86
end
87
88
if options[:except]
0 commit comments