mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Remove old unneeded code
This commit is contained in:
parent
1eb09476ef
commit
d5308b4d0b
@ -161,8 +161,7 @@ end
|
|||||||
if associated_data.respond_to?(:to_ary)
|
if associated_data.respond_to?(:to_ary)
|
||||||
associated_data.map { |elem| association.build_serializer(elem).serializable_hash }
|
associated_data.map { |elem| association.build_serializer(elem).serializable_hash }
|
||||||
else
|
else
|
||||||
result = association.build_serializer(associated_data).serializable_hash
|
association.build_serializer(associated_data).serializable_hash
|
||||||
association.is_a?(Association::HasMany) ? [result] : result
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user