fields-serializer 0.6.3 → 0.6.4

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: 0a40d814b11b8a789f079dd17c01cd6da9ef08a9
4
- data.tar.gz: b107747d4a6d73b2e23616db6af21ad986108e96
3
+ metadata.gz: 30960fcbcf7ca34b2afab4071e75e25a5dff9985
4
+ data.tar.gz: 0caa871a6b14bdac321bc4f3b53003d4ea1d398d
5
5
  SHA512:
6
- metadata.gz: a10e3adab1752e273bbef998e232cf8e9a466cfe92ec8cfc1ae7c7b2418fe3b3e1167265380e3119de7c4ab3b4b03991e61ea1ceda9613a2670df3728f0db004
7
- data.tar.gz: 2b5c1a57588956d70ca910535bbe8cc0de4100ad0b3152e5fb04d078fbc1c129a0316f092ab00fd12cde9c667be7281c27b6d3473c1b54324b589a92753aa25a
6
+ metadata.gz: 2302de02d444424bfc02b88d7ccf750f20f003ef649d930dab22b027cbc9cf02be5582b8caf400dd63c6e6f385d8c45b00a7f42c6f2993f536823f3a41996507
7
+ data.tar.gz: 4c96cf021d40bc3f5162b1e4fc37c7917b9c5baa86dbb6aa301d6f58b4c0b07ef57c4706ef0c7cc6204292b11e4515b536cb1f3ff134c4407d2d7329649d6f8a
@@ -6,13 +6,12 @@ module Fields
6
6
  extend ActiveSupport::Concern
7
7
 
8
8
 
9
- # Render the result of an ActiveRecord query including only the fields specified if any
10
- # or the whole serialized objects.
9
+ # Render the result of an ActiveRecord::Relation query including only the fields specified
11
10
  #
12
- # @param [ActiveRecord_Relation] query - The query to render in json
13
- # @option options [Array] :fields - The list of fields to return in json api syntax
14
- # @option options [Class] :model_class - The model class of the objects to be queried to optimize db hits.
15
- # @option options [Hash] :options - Any other valid option to render method.
11
+ # @param [ActiveRecord::Relation] query - The query to render in json
12
+ # @option options [Array] :fields - The list of fields to return in json api syntax
13
+ # @option options [Class] :model_class - The model class of the objects to be queried to optimize db hits.
14
+ # @option options [Hash] :options - Any other valid option to render method.
16
15
  def render_json_fields(query, **options)
17
16
  fields = options.delete(:fields)
18
17
  model_class = options.delete(:model_class)
@@ -1,5 +1,5 @@
1
1
  module Fields
2
2
  module Serializer
3
- VERSION = "0.6.3"
3
+ VERSION = "0.6.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fields-serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Chinery