apicasso 0.4.3 → 0.4.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: '078e09acc04bc5663c38bba067b6094391aa50c0'
4
- data.tar.gz: '09f31a1909726df2e2145d4d03a0160a334580d6'
3
+ metadata.gz: 8e049a1ca92652c86611c28db15846ac849ae8c5
4
+ data.tar.gz: 69471fe66d9d3955c57e88c253ff6a3bfe04e62e
5
5
  SHA512:
6
- metadata.gz: c66be4d5abae92c029e2f62d7998329ae73a1402294ec7fe5f9d3aeb6c95edd63635439f5f22a1b065516d5f22809630f7af9ddacd7f5a35c6ed085b2f00df7d
7
- data.tar.gz: 5b3d3a12add6e28b01eee9bf5c20456357a548a4da0ba7da678fe9005a71880e5bc49a6cc836845e5e8447c70d0fc6265f7599a60974bbbd2673b6ffd1d8a0e3
6
+ metadata.gz: 5b8a62a57d074361a542d336d0158891bdb2717696052332704bc761622348f47f2b3d0202c2249c67e5b2eb954e727e70e7e244f36f19b11a823dc79cabdcab
7
+ data.tar.gz: 622489568329a3dbf955147880d5d6b121a26fa2ff788430176a8c36cc023b25015bc477086a0f214429fc1943896eff6c3c32e254d6ea1a05fd59e82e39f9df
data/README.md CHANGED
@@ -198,7 +198,7 @@ Each of those attributes on the `?group` parameter represent an option of the qu
198
198
 
199
199
  - `group[by]` - Represents which field will be the key for the grouping behavior
200
200
  - `group[calculate]` - Which calculation will be sent in the response. Options are: `count`, `maximum`, `minimum`, `average`, `sum`
201
- - `group[fields]` - Represents which field will be the base for the response calculation.
201
+ - `group[field]` - Represents which field will be the base for the response calculation.
202
202
 
203
203
  # Contributing
204
204
 
@@ -153,7 +153,7 @@ module Apicasso
153
153
  # or a grouped count of attributes
154
154
  def index_json
155
155
  if params[:group].present?
156
- @records.group(params[:group][:by].split(',')).send(params[:group][:calculate], params[:group][:fields]||params[:group][:by].split(','))
156
+ @records.group(params[:group][:by].split(',')).send(:calculate, params[:group][:calculate], params[:group][:field])
157
157
  else
158
158
  collection_response
159
159
  end
@@ -1,3 +1,3 @@
1
1
  module Apicasso
2
- VERSION = '0.4.3'.freeze
2
+ VERSION = '0.4.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apicasso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Bellincanta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-27 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler