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 +4 -4
- data/README.md +1 -1
- data/app/controllers/apicasso/crud_controller.rb +1 -1
- data/lib/apicasso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e049a1ca92652c86611c28db15846ac849ae8c5
|
4
|
+
data.tar.gz: 69471fe66d9d3955c57e88c253ff6a3bfe04e62e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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[
|
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(
|
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
|
data/lib/apicasso/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|