jsonapi-resources 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi/operation.rb +4 -4
- data/lib/jsonapi/resource.rb +1 -1
- data/lib/jsonapi/resources/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f19bd8952d6f9ad375cdd0771b95ea66b7f58bd4
|
4
|
+
data.tar.gz: 0f3ee0a42a392f2f3569997473b1f504618a3d06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91600fddbd75792442e535374e131e878a133f087bc74103c41e6cf439c666657e9b6ed2b3c5abfbaf350b28b678acceb5a39b4b0050a31be553f844d83d951c
|
7
|
+
data.tar.gz: 4699a968d96300ca0b24174ba308d7fcddf973b2fb4f93dd0693c5d39294804eaee80cf46158964752d371c1179d4c695ab2b447ba584c659d4902c98abeb2e3
|
data/lib/jsonapi/operation.rb
CHANGED
@@ -22,7 +22,7 @@ module JSONAPI
|
|
22
22
|
def apply(context)
|
23
23
|
resource = @resource_klass.new
|
24
24
|
resource.replace_fields(@values, context)
|
25
|
-
resource.save
|
25
|
+
resource.save(context)
|
26
26
|
|
27
27
|
return JSONAPI::OperationResult.new(:created, resource)
|
28
28
|
|
@@ -64,7 +64,7 @@ module JSONAPI
|
|
64
64
|
def apply(context)
|
65
65
|
resource = @resource_klass.find_by_key(@resource_id, context)
|
66
66
|
resource.replace_fields(values, context)
|
67
|
-
resource.save
|
67
|
+
resource.save(context)
|
68
68
|
|
69
69
|
return JSONAPI::OperationResult.new(:ok, resource)
|
70
70
|
|
@@ -86,7 +86,7 @@ module JSONAPI
|
|
86
86
|
def apply(context)
|
87
87
|
resource = @resource_klass.find_by_key(@resource_id, context)
|
88
88
|
resource.replace_has_one_link(@association_type, @key_value, context)
|
89
|
-
resource.save
|
89
|
+
resource.save(context)
|
90
90
|
|
91
91
|
return JSONAPI::OperationResult.new(:created, resource)
|
92
92
|
end
|
@@ -143,7 +143,7 @@ module JSONAPI
|
|
143
143
|
def apply(context)
|
144
144
|
resource = @resource_klass.find_by_key(@resource_id, context)
|
145
145
|
resource.remove_has_one_link(@association_type, context)
|
146
|
-
resource.save
|
146
|
+
resource.save(context)
|
147
147
|
|
148
148
|
return JSONAPI::OperationResult.new(:no_content)
|
149
149
|
end
|
data/lib/jsonapi/resource.rb
CHANGED
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.0.
|
4
|
+
version: 0.0.3
|
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: 2014-08-
|
12
|
+
date: 2014-08-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|