apique 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apique/editable.rb +2 -2
- data/lib/apique/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: 2abc44aee04063bac64d15d2fded5de9af1f76cf
|
4
|
+
data.tar.gz: 7052d6f9a055809dcb3552191a548d3fb60a8b2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5129c3710bc99de5fc2e01cee6b38fbf01b3ddcec925f1ed0d1e406c57f0a0bfff316805caa2a8deb92bfbf2ebb1e4c5739b62c4adddbe965244555022e91f4d
|
7
|
+
data.tar.gz: 48fc61433beb3a60d23a28604d2ff554fd8b45dfc0c6a275ba047ca64773b39218e4381af5a690960d6bdae6ec50eee4357ce51a99dadb9899747ee3fe8f3b02
|
data/lib/apique/editable.rb
CHANGED
@@ -26,7 +26,7 @@ module Apique::Editable
|
|
26
26
|
|
27
27
|
# PATCH/PUT /api/{plural_resource_name}/{id}
|
28
28
|
def update
|
29
|
-
if get_resource.update(
|
29
|
+
if get_resource.update(apique_update_params)
|
30
30
|
render json: get_resource
|
31
31
|
else
|
32
32
|
render json: {errors: get_resource.errors}
|
@@ -61,7 +61,7 @@ module Apique::Editable
|
|
61
61
|
def set_resource(resource = nil)
|
62
62
|
resource ||= params[:id] ? resource_class.find(params[:id]) : resource_class.new(apique_create_params)
|
63
63
|
unless resource
|
64
|
-
raise RecordNotFound, "could not find a record of type #{resource_class} with id = #{params[:id]}"
|
64
|
+
raise Apique::RecordNotFound, "could not find a record of type #{resource_class} with id = #{params[:id]}"
|
65
65
|
end
|
66
66
|
|
67
67
|
instance_variable_set(resource_variable_name, resource)
|
data/lib/apique/version.rb
CHANGED