jsonapi-resources 0.10.0.beta4 → 0.10.0.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi/link_builder.rb +2 -0
- data/lib/jsonapi/resources/version.rb +1 -1
- data/lib/jsonapi/routing_ext.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59bf56567199fc023e62eb521bfab9887346b0b1201a89915de98edb56bb2455
|
4
|
+
data.tar.gz: 3321b686ec96c9828e68595ced3a9e82600605cc0ce24d36eb70905141feaa74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a6d23df106df92c12c4c7df292c330ed285550d2c61a88eec3e078884a7d565522e84d70464afa1084c741b472c4eda5de308227a0138b89c11bb4479a304f
|
7
|
+
data.tar.gz: 8a4fc235a30de87a892010b822a3d9f6e6b27b5fcb9da453fafafc700b99edd3dca128e2965532c40eba6493befba33ca73730bc374ae0502c1242b378a292bf
|
data/lib/jsonapi/link_builder.rb
CHANGED
@@ -150,12 +150,14 @@ module JSONAPI
|
|
150
150
|
|
151
151
|
def related_url_helper_name(relationship)
|
152
152
|
relationship_parts = resource_path_parts_from_class(relationship.parent_resource)
|
153
|
+
relationship_parts << "related"
|
153
154
|
relationship_parts << relationship.name
|
154
155
|
url_helper_name_from_parts(relationship_parts)
|
155
156
|
end
|
156
157
|
|
157
158
|
def singleton_related_url_helper_name(relationship)
|
158
159
|
relationship_parts = []
|
160
|
+
relationship_parts << "related"
|
159
161
|
relationship_parts << relationship.name
|
160
162
|
relationship_parts += resource_path_parts_from_class(relationship.parent_resource)
|
161
163
|
url_helper_name_from_parts(relationship_parts)
|
data/lib/jsonapi/routing_ext.rb
CHANGED
@@ -232,7 +232,7 @@ module ActionDispatch
|
|
232
232
|
match formatted_relationship_name, controller: options[:controller],
|
233
233
|
relationship: relationship.name, source: resource_type_with_module_prefix(source._type),
|
234
234
|
action: 'show_related_resource', via: [:get],
|
235
|
-
as: relationship_name
|
235
|
+
as: "related/#{relationship_name}"
|
236
236
|
end
|
237
237
|
|
238
238
|
def jsonapi_related_resources(*relationship)
|
@@ -250,7 +250,7 @@ module ActionDispatch
|
|
250
250
|
controller: options[:controller],
|
251
251
|
relationship: relationship.name, source: resource_type_with_module_prefix(source._type),
|
252
252
|
action: 'index_related_resources', via: [:get],
|
253
|
-
as: relationship_name
|
253
|
+
as: "related/#{relationship_name}"
|
254
254
|
end
|
255
255
|
|
256
256
|
protected
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.0.
|
4
|
+
version: 0.10.0.beta5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Gebhardt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|