ocean-rails 2.10.5 → 2.11.0
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 +3 -3
- data/lib/ocean/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c8b9c444c3baca4602cd4c1aaa72dd72ef648cb
|
4
|
+
data.tar.gz: 0334d29530642790a43fb697482f7fb4def744ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d61c35e1cc0caf14d6dbaae57f0d4d03b5ba07265cf4f771b07a9b7cbb2ac0c225f55ee91b897392b34883e5fec60f8ebab01877f041715c2e9758c4715509d
|
7
|
+
data.tar.gz: a8c1cb5d6d9684100b062c650728b2f096f1337ebd5bb70e680dfb839c641138c4b53d2095d43f5e0d78c247cbd1ae05e12fec309f72b5f395cb052955001c52
|
@@ -170,9 +170,9 @@ module OceanApplicationController
|
|
170
170
|
# their standard position, begin with an underscore, etc. The +ocean+ gem generator
|
171
171
|
# for resources creates a partial in the proper location.
|
172
172
|
#
|
173
|
-
def api_render(x, new: false, href: url_for(params))
|
173
|
+
def api_render(x, new: false, href: url_for(params), override_partial: false)
|
174
174
|
if !x.is_a?(Array) && !(defined?(ActiveRecord) && x.is_a?(ActiveRecord::Relation))
|
175
|
-
partial = x.to_partial_path
|
175
|
+
partial = override_partial || x.to_partial_path
|
176
176
|
if new
|
177
177
|
render partial: partial, object: x, status: 201, location: x
|
178
178
|
else
|
@@ -183,7 +183,7 @@ module OceanApplicationController
|
|
183
183
|
resources = x.dup.collect { |m| render_to_string(partial: m.to_partial_path,
|
184
184
|
locals: {m.class.model_name.i18n_key => m}) }
|
185
185
|
count = resources.count
|
186
|
-
total_count = x.
|
186
|
+
total_count = x.unscope(:limit, :offset).count
|
187
187
|
attrs = {count: count,
|
188
188
|
total_count: total_count
|
189
189
|
}
|
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.
|
4
|
+
version: 2.11.0
|
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-04-
|
11
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 4.
|
131
|
+
version: 4.0.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 4.
|
138
|
+
version: 4.0.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: sqlite3
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|