graph_starter 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/graph_starter/assets/show.json.jbuilder +10 -1
- data/lib/graph_starter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 940263fddced646bc176701aaf217487a77cbf91
|
4
|
+
data.tar.gz: 5dcd4f60644deb80119ea8fd55c49472e95d6645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471f43e5c2e64d175608df231e0efbd4982bea5c619a72d1497d2490b0d27a012a96bc120ccdcb386d2b054d8c27c7248846f5b97d7688762cb9d1af81c82411
|
7
|
+
data.tar.gz: 5d9e6fbdba1150de2ed7a6d4f6de18f02792b90e4e657c55ad95bb3701ed5fc93da5a4d7e7777a1fe55086af9698e6bd9d55661782d3ed4f84215c1d85b296b8
|
@@ -5,7 +5,16 @@ end
|
|
5
5
|
|
6
6
|
json.associations do
|
7
7
|
@asset.class.authorized_associations.each do |name, association|
|
8
|
-
|
8
|
+
value = case association.type
|
9
|
+
when :has_many
|
10
|
+
@asset.send(name).to_a
|
11
|
+
when :has_one
|
12
|
+
@asset.send(name)
|
13
|
+
else
|
14
|
+
fail "Invalid association: #{association.inspect}"
|
15
|
+
end
|
16
|
+
|
17
|
+
json.set! name, value
|
9
18
|
end
|
10
19
|
end
|
11
20
|
|