jsonapi_compliable 0.11.21 → 0.11.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca6a714ac09620228867d66d192bdb5e00ac1770
4
- data.tar.gz: d2e7ec091c60925bfb404cdf5f755dd123a8d229
3
+ metadata.gz: 8a39b1b919948cf402b0d9d0bbeedd2fac003f78
4
+ data.tar.gz: 27f32e6407b6630a9d10d6f7881f6b309f3aa130
5
5
  SHA512:
6
- metadata.gz: df26b799088d05865d3a6c9b3cbfee738b46a7242f23318cf426a9c18c765635526ae7fcf5fd03395c003a3c036f21f58756bf0b1056e95b225dc5312afb49aa
7
- data.tar.gz: 8ad6084d7b8460193125e59669edcb9589d6c36b03719afb8b7fb814546d41d9612224c2d5567c20b933df304514b41edd8cc4cf420210b8a3c6ea8fe2c35fa8
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 ||= self.class._jsonapi_compliable.new
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
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.11.21"
2
+ VERSION = "0.11.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.21
4
+ version: 0.11.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond