menilite 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/menilite/model.rb +8 -1
- data/lib/menilite/version.rb +1 -1
- 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: 39b69eb5eec382500250f033e5156e8a92e4811cbb865976d6dc69b43def1a40
|
4
|
+
data.tar.gz: 4c6b62aa93fcf6ed3cb28f4cc8f4539fc58b6a11c4654e9bfa5dc21b871b0d08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9a6e102780769e7b76f3ce3cd017d2e60f4346ad9cfbfbf372791b7e377c8d37968437c355b6cf5127604a66ad663615d789f894030c8aa297b476c7397824
|
7
|
+
data.tar.gz: fb197f8b37e7ed3330803ef58c0b78945f963308c411ba403777b9b06340f555600f466b408f89b2f39962e68d3e1e5451b1749273704c773f6440fbbeda525c
|
data/lib/menilite/model.rb
CHANGED
@@ -459,7 +459,14 @@ module Menilite
|
|
459
459
|
|
460
460
|
def resolve_references(key, value)
|
461
461
|
if self.class.field_info.has_key?(key) && self.class.field_info[key].type == :reference
|
462
|
-
|
462
|
+
case value
|
463
|
+
when Menilite::Model
|
464
|
+
["#{key}_id".to_sym, value.id]
|
465
|
+
when Hash
|
466
|
+
["#{key}_id".to_sym, value[:guid]]
|
467
|
+
else
|
468
|
+
raise "value is #{value.class}"
|
469
|
+
end
|
463
470
|
else
|
464
471
|
[key, value]
|
465
472
|
end
|
data/lib/menilite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: menilite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- youchan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|