odata-model 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/odata/model/associations.rb +3 -1
- data/lib/odata/model/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: bac0c5021223506bae2ee4da7e235a390b7faaff
|
4
|
+
data.tar.gz: 7cdb16253de2e8a4e0ac836be8191bee3e36f287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 481fe15aa2fb418a246ee275cc7d2c1a385ff4fbf9476dd13a4272031a768cd1c1da036f3bb4a76ca4a489e23b99437f98ae367794f48c0dfb5aa37ba72d9fdc
|
7
|
+
data.tar.gz: e0130559ce0f9ddc1250ba034f0b821457b5477c13e3d45aa97da344e017c36a36f0d05034b6912dd85fbdecb68152d78c450f46a09ca53ea3a549278b6099af
|
data/CHANGELOG.md
CHANGED
@@ -47,14 +47,16 @@ module OData
|
|
47
47
|
association_entities = odata_entity.associations[association_name]
|
48
48
|
klass = self.class.odata_associations[association_name][:class_name]
|
49
49
|
model_klass = klass.is_a?(Class) ? klass : klass.to_s.constantize
|
50
|
-
|
50
|
+
|
51
51
|
if association_entities.is_a?(Enumerable)
|
52
52
|
association_entities.collect do |entity|
|
53
|
+
model = model_klass.new
|
53
54
|
model.instance_variable_set(:@odata_entity, entity)
|
54
55
|
model
|
55
56
|
end
|
56
57
|
else
|
57
58
|
return nil if association_entities.nil?
|
59
|
+
model = model_klass.new
|
58
60
|
model.instance_variable_set(:@odata_entity, association_entities)
|
59
61
|
model
|
60
62
|
end
|
data/lib/odata/model/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odata-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|