apicasso 0.2.12 → 0.2.13
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 +4 -4
- data/app/controllers/apicasso/crud_controller.rb +12 -1
- data/lib/apicasso/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: d23bf1e982667cfbe69d49272f00c1edea4cbfb8
|
|
4
|
+
data.tar.gz: 5d75984841dd677e2c4018c8a0fb283fd60344e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 372ec69d373def8f5e8f7be77680b0632e73bf99e311aeba100fe1fd30e985a1635bb8536ab905b7f8e2c0475e6baa1e6a4aab14676815cba8b3f805bf821af0
|
|
7
|
+
data.tar.gz: 792729ac95086b1ded667bdab842f2ce8f4fe583d5121267479c875d3fd5464e7ba3c564d62eb0c218e545a65153acc10b5bde1147f350a07bc3424e776260d1
|
|
@@ -28,7 +28,8 @@ module Apicasso
|
|
|
28
28
|
# relation/methods including on response
|
|
29
29
|
def show
|
|
30
30
|
set_access_control_headers
|
|
31
|
-
|
|
31
|
+
byebug
|
|
32
|
+
render json: show_json
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
# PATCH/PUT /:resource/1
|
|
@@ -159,6 +160,16 @@ module Apicasso
|
|
|
159
160
|
end
|
|
160
161
|
end
|
|
161
162
|
|
|
163
|
+
# The response for show action, which can be a fieldset
|
|
164
|
+
# or a full response of attributes
|
|
165
|
+
def show_json
|
|
166
|
+
if params[:select].present?
|
|
167
|
+
@object.to_json(include: parsed_include, only: parsed_select)
|
|
168
|
+
else
|
|
169
|
+
@object.to_json(include: parsed_include)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
162
173
|
# Parsing of `paginated_records` with pagination variables metadata
|
|
163
174
|
def built_paginated
|
|
164
175
|
{ entries: paginated_records }.merge(pagination_metadata_for(paginated_records))
|
data/lib/apicasso/version.rb
CHANGED