eivo-rails-api 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b93f8aa8e0fe3d2189265c57125ed2974ec6c62
|
4
|
+
data.tar.gz: bb669e2d2c833a5bb88fb412153eef83759214e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0846f4061e04880efede8b0fa6eb820d186c2ebab02ecffc9694441620b9a6bebfe50cf04bc70fc678a2f40640fc3d6469a3fe5731e8528d2758bf51207d6ee4
|
7
|
+
data.tar.gz: 3f084ba81858becbafeadfb76ec9d1b8dd8778c1b3899398c3f16bdf14ba6778a8fcba002f847620831c948f454b872b78cf1a5c4af0a43a65d478b4a245832a
|
@@ -15,7 +15,9 @@ module EIVO
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def create
|
18
|
-
@object ||= collection.new
|
18
|
+
@object ||= collection.new
|
19
|
+
@object.assign_attributes(object_params_create)
|
20
|
+
|
19
21
|
if @object.save
|
20
22
|
render_success serializer.new(@object, @serializer_options)
|
21
23
|
else
|
@@ -25,7 +27,9 @@ module EIVO
|
|
25
27
|
|
26
28
|
def update
|
27
29
|
@object ||= collection
|
28
|
-
|
30
|
+
@object.assign_attributes(object_params_update)
|
31
|
+
|
32
|
+
if @object.save
|
29
33
|
render_success serializer.new(@object, @serializer_options)
|
30
34
|
else
|
31
35
|
render_model_errors @object.errors
|
@@ -37,7 +37,9 @@ module EIVO
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def create
|
40
|
-
@object ||= collection.new
|
40
|
+
@object ||= collection.new
|
41
|
+
@object.assign_attributes(object_params_create)
|
42
|
+
|
41
43
|
if @object.save
|
42
44
|
render_success serializer.new(@object, @serializer_options)
|
43
45
|
else
|
@@ -47,7 +49,9 @@ module EIVO
|
|
47
49
|
|
48
50
|
def update
|
49
51
|
@object ||= collection.find(params[:id])
|
50
|
-
|
52
|
+
@object.assign_attributes(object_params_update)
|
53
|
+
|
54
|
+
if @object.save
|
51
55
|
render_success serializer.new(@object, @serializer_options)
|
52
56
|
else
|
53
57
|
render_model_errors @object.errors
|
data/eivo-rails-api.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eivo-rails-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan VUKOVICH-TRIBOUHARET
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|