forest_liana 2.2.1 → 2.2.2
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 +4 -4
- data/lib/forest_liana/collection.rb +15 -9
- data/lib/forest_liana/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: 15ea9f066a2a6d011ae9b361bfe81961db0c5f34
|
4
|
+
data.tar.gz: e55d8395f7dde68ab26a2f59be99ef37e2e72ca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d474221475fa26bf7f10a405e63c5d0da41a43bc28562d5b9d5a77162df2e8d5c8c3aa3b13e28d0f8d97f3b13bd27374bc507daf965be256a6884e23a5724a2e
|
7
|
+
data.tar.gz: 3fa48e2d68c70985ea1417f320065ba8fb5371d1ae0254c46bdc94c4faa49149cb4e3a466da851cb795b348441f608444bf6a02ac0151aca917423c72e0c0885
|
@@ -56,17 +56,23 @@ module ForestLiana::Collection
|
|
56
56
|
if serializer_name && ForestLiana::UserSpace.const_defined?(
|
57
57
|
serializer_name)
|
58
58
|
ForestLiana::UserSpace.const_get(serializer_name).class_eval do
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
if block
|
60
|
+
# NOTICE: Smart Field case.
|
61
|
+
compute_value = lambda do |object|
|
62
|
+
begin
|
63
|
+
object.instance_eval(&block)
|
64
|
+
rescue => exception
|
65
|
+
FOREST_LOGGER.error "Cannot retrieve the " + name.to_s + " value because of an " \
|
66
|
+
"internal error in the getter implementation: " + exception.message
|
67
|
+
nil
|
68
|
+
end
|
66
69
|
end
|
67
|
-
end
|
68
70
|
|
69
|
-
|
71
|
+
attribute(name, &compute_value)
|
72
|
+
else
|
73
|
+
# NOTICE: Smart Collection field case.
|
74
|
+
attribute(name)
|
75
|
+
end
|
70
76
|
end
|
71
77
|
end
|
72
78
|
end
|
data/lib/forest_liana/version.rb
CHANGED