kea-rails 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83ede11805e19e8745995c510c8f303609610190
|
|
4
|
+
data.tar.gz: 7673678239b7ff940f9752b6a74036491da22e5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d49bd7fb152f21d4cd1f1e82b8c653a6e50ae7032a873dcb080262bbd120f82d7b9f023fdd2e19c5a5db825225624cadb9f970d4f373891af89b779532b7111a
|
|
7
|
+
data.tar.gz: 2fd2673d9ab89afa7a5b9b831e583bfb24954c06fb826e774fd2e3ec0bd9599b7e3c008c7afd54b0771511a4641bda7ff62baab2473888784529067725a6716c
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
|
|
61
61
|
this.isValidatable = ko.observable(false);
|
|
62
62
|
|
|
63
|
-
this.makeValidatable = function makeValidatable() {
|
|
63
|
+
this.makeValidatable = function makeValidatable(options) {
|
|
64
64
|
if (DEBUG) {
|
|
65
65
|
console.assert(this.attachValidators, "object does not implement attachValidators");
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
this.attachValidators();
|
|
68
|
+
this.attachValidators(options);
|
|
69
69
|
this.isValidatable(true);
|
|
70
70
|
};
|
|
71
71
|
|
|
@@ -14,7 +14,11 @@ module Kea
|
|
|
14
14
|
|
|
15
15
|
serializer = options[:serializer] || target.active_model_serializer
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
if target.is_a?(ActiveRecord::Relation)
|
|
18
|
+
ActiveModel::ArraySerializer.new(target, each_serializer: serializer, scope: self).to_json
|
|
19
|
+
else
|
|
20
|
+
serializer.new(target, options).to_json
|
|
21
|
+
end
|
|
18
22
|
end
|
|
19
23
|
|
|
20
24
|
def cache_json(object, path = nil, options = {})
|
data/lib/kea-rails/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kea-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan-Christian Foeh
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|