attribute_serializer 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/attribute_serializer.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/attribute_serializer.rb
CHANGED
@@ -39,8 +39,8 @@ module AttributeSerializer
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def generate(context_name, object)
|
42
|
-
if object.
|
43
|
-
object.
|
42
|
+
if object.respond_to? :collect
|
43
|
+
object.collect { |o| generate_single(o.class, context_name, o) }
|
44
44
|
else
|
45
45
|
generate_single(object.class, context_name, object)
|
46
46
|
end
|