ocean-rails 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/ocean_application_controller.rb +6 -2
- data/lib/ocean/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: d8d0e06a51eb9695e45cbd3117875807398ad746
|
4
|
+
data.tar.gz: bc840097a5de048b4b8256ad656b8618abb1a4b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f72419c440325db8eb7d82f9d5f397c93e0c007c068738ab00842246a70a7619a7ca067f54b3d6f562bf25adc8a41685eec066a069a2e3dbc8ad130736f2d63d
|
7
|
+
data.tar.gz: dff353241989bd4c3bbb4a8ff65e6e93b5bb6640698d0cd808c6f5201a9cfc58e2a3067e7796394458a00b9bbf77754cb80e364ac05d611c58c4dbca051c622e
|
@@ -176,10 +176,14 @@ module OceanApplicationController
|
|
176
176
|
else
|
177
177
|
resources = x.collect { |m| render_to_string(partial: m.to_partial_path,
|
178
178
|
locals: {m.class.model_name.i18n_key => m}) }
|
179
|
-
attrs = {count: resources.count
|
179
|
+
attrs = {count: resources.count,
|
180
|
+
total_count: x.unscope(:where, :order, :limit, :offset, :group, :having).count,
|
181
|
+
_links: {self: {href: request.url, type: 'application/json'}
|
182
|
+
}
|
183
|
+
}
|
180
184
|
render text: '{"_collection":{"resources":[' + resources.join(',') + ']' +
|
181
185
|
(attrs.collect do |k, v|
|
182
|
-
',"' + k.to_s + '":' + v.
|
186
|
+
',"' + k.to_s + '":' + v.to_json
|
183
187
|
end).join('') +
|
184
188
|
'}}'
|
185
189
|
end
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|