jsonapi_compliable 0.11.21 → 0.11.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi_compliable/base.rb +8 -1
- data/lib/jsonapi_compliable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a39b1b919948cf402b0d9d0bbeedd2fac003f78
|
4
|
+
data.tar.gz: 27f32e6407b6630a9d10d6f7881f6b309f3aa130
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79556dc3d297f38e5be9d4f8e462ccf5d3cf1928d64299c2da9eac72b1fb729c52b04a76f7d388917c791c6f2b82f684289f65dc5a40c5d2a402e5d8042722ec
|
7
|
+
data.tar.gz: 1d999e08ebbf82e359d9481c1d4deb167c589ef9db460bd0d191b29a30ee0a6204fc6f50be8cdfe5be62c5d4359a2c89afa66019989f2e923ac14485c005ff01
|
@@ -106,7 +106,14 @@ module JsonapiCompliable
|
|
106
106
|
#
|
107
107
|
# @return [Resource] the configured Resource for this controller
|
108
108
|
def jsonapi_resource
|
109
|
-
@jsonapi_resource ||=
|
109
|
+
@jsonapi_resource ||= begin
|
110
|
+
resource = self.class._jsonapi_compliable
|
111
|
+
if resource.is_a?(Hash)
|
112
|
+
resource[action_name.to_sym].new
|
113
|
+
else
|
114
|
+
resource.new
|
115
|
+
end
|
116
|
+
end
|
110
117
|
end
|
111
118
|
|
112
119
|
# Instantiates the relevant Query object
|