apicasso 0.2.12 → 0.2.13

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: d203ec2973f8d587f9a6400b2879ce251828dc73
4
- data.tar.gz: 565b3d5665d60e24499e3dee73e359b9079a95c8
3
+ metadata.gz: d23bf1e982667cfbe69d49272f00c1edea4cbfb8
4
+ data.tar.gz: 5d75984841dd677e2c4018c8a0fb283fd60344e3
5
5
  SHA512:
6
- metadata.gz: c197803064d3cec84253b9579f83f62ae3320a1e8693253b0820998c04a7943bd030ab09900f948b217b66484731885bd08ed24febd50ccc2d7e051c6b8927d9
7
- data.tar.gz: c50a86f7b2cca4776d76ed343430fd919b8eaec26d60c2edd639cc5c7289d74c0f7878e7ca64999cb7e512e455a1ee3aebc577ceb37dde2fae856c5c8fa44806
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
- render json: @object.to_json(include: parsed_include, only: parsed_select)
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))
@@ -1,3 +1,3 @@
1
1
  module Apicasso
2
- VERSION = '0.2.12'
2
+ VERSION = '0.2.13'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apicasso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Bellincanta