We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4e46ed0 + a26df4f commit b0f662bCopy full SHA for b0f662b
1 file changed
lib/jsonapi/routing_ext.rb
@@ -37,15 +37,15 @@ def jsonapi_resource(*resources, &block)
37
end
38
39
40
- def jsonapi_relationships
+ def jsonapi_relationships(options = {})
41
res = JSONAPI::Resource.resource_for(resource_type_with_module_prefix(@resource_type))
42
res._associations.each do |association_name, association|
43
if association.is_a?(JSONAPI::Association::HasMany)
44
- jsonapi_links(association_name)
45
- jsonapi_related_resources(association_name)
+ jsonapi_links(association_name, options)
+ jsonapi_related_resources(association_name, options)
46
else
47
- jsonapi_link(association_name)
48
- jsonapi_related_resource(association_name)
+ jsonapi_link(association_name, options)
+ jsonapi_related_resource(association_name, options)
49
50
51
0 commit comments