activemodel-embedding 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_model/embedding/version.rb +1 -1
- data/lib/active_model/type/document.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4023785e62fab8246dc3c748f42810d6591a26d0ba580a12d2477afac1e3c01b
|
4
|
+
data.tar.gz: a618e6a770d2003c399f8dc9942db4e56991978cd9a6992e70f0224bfc0e5324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13a8ce8726f54af05661a318524f640fd82934dcbf600a2baf027ce329d89be047da2ae6a60ab7ddabaf44359354c74d044f421ffce60f487cdf8c9b6ec7a916
|
7
|
+
data.tar.gz: 53f02da4ffdbb51740d0c5cfc18d6274e532e02f38c1ffe59d3b1ffb9f4050592373a6f4a7358b5981e4d0392488d5db25798c431e11c397b18ec2033a3c002e
|
@@ -39,10 +39,14 @@ module ActiveModel
|
|
39
39
|
return unless value
|
40
40
|
|
41
41
|
if collection?
|
42
|
+
return value if value.respond_to? :document_class
|
43
|
+
|
42
44
|
documents = value.map { |attributes| process attributes }
|
43
45
|
|
44
46
|
collection_class.new(documents)
|
45
47
|
else
|
48
|
+
return value if value.respond_to? :id
|
49
|
+
|
46
50
|
process value
|
47
51
|
end
|
48
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemodel-embedding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mansakondo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|